<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<title>Phaser 3 API Documentation - Class: LoaderPlugin</title>
	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
	<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
	<link type="text/css" rel="stylesheet" href="styles/search.loading.css" />
</head>

<body>

<div class="navbar navbar-default navbar-fixed-top ">
<div class="container">
	<div class="navbar-header">
		<a class="navbar-brand" href="index.html"><img class="branding-logo" src="img/phaser3-logo-nav.png"
		alt="Phaser 3 logo" title="Phaser 3" /></a>
		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
        </button>
	</div>
	<div class="navbar-collapse collapse" id="topNavigation">
		<ul class="nav navbar-nav">
			
			<li class="dropdown">
				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Phaser.html">Phaser</a></li><li><a href="Phaser.Actions.html">Phaser.Actions</a></li><li><a href="Phaser.Animations.html">Phaser.Animations</a></li><li><a href="Phaser.Animations.Events.html">Phaser.Animations.Events</a></li><li><a href="Phaser.BlendModes.html">Phaser.BlendModes</a></li><li><a href="Phaser.Cache.html">Phaser.Cache</a></li><li><a href="Phaser.Cache.Events.html">Phaser.Cache.Events</a></li><li><a href="Phaser.Cameras.html">Phaser.Cameras</a></li><li><a href="Phaser.Cameras.Controls.html">Phaser.Cameras.Controls</a></li><li><a href="Phaser.Cameras.Scene2D.html">Phaser.Cameras.Scene2D</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.html">Phaser.Cameras.Scene2D.Effects</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html">Phaser.Cameras.Scene2D.Events</a></li><li><a href="Phaser.Cameras.Sprite3D.html">Phaser.Cameras.Sprite3D</a></li><li><a href="Phaser.Core.html">Phaser.Core</a></li><li><a href="Phaser.Core.Events.html">Phaser.Core.Events</a></li><li><a href="Phaser.Create.html">Phaser.Create</a></li><li><a href="Phaser.Create.Palettes.html">Phaser.Create.Palettes</a></li><li><a href="Phaser.Curves.html">Phaser.Curves</a></li><li><a href="Phaser.Data.html">Phaser.Data</a></li><li><a href="Phaser.Data.Events.html">Phaser.Data.Events</a></li><li><a href="Phaser.Device.html">Phaser.Device</a></li><li><a href="Phaser.Display.html">Phaser.Display</a></li><li><a href="Phaser.Display.Align.html">Phaser.Display.Align</a></li><li><a href="Phaser.Display.Align.In.html">Phaser.Display.Align.In</a></li><li><a href="Phaser.Display.Align.To.html">Phaser.Display.Align.To</a></li><li><a href="Phaser.Display.Bounds.html">Phaser.Display.Bounds</a></li><li><a href="Phaser.Display.Canvas.html">Phaser.Display.Canvas</a></li><li><a href="Phaser.Display.Canvas.CanvasInterpolation.html">Phaser.Display.Canvas.CanvasInterpolation</a></li><li><a href="Phaser.Display.Canvas.CanvasPool.html">Phaser.Display.Canvas.CanvasPool</a></li><li><a href="Phaser.Display.Canvas.Smoothing.html">Phaser.Display.Canvas.Smoothing</a></li><li><a href="Phaser.Display.Color.Interpolate.html">Phaser.Display.Color.Interpolate</a></li><li><a href="Phaser.Display.Masks.html">Phaser.Display.Masks</a></li><li><a href="Phaser.DOM.html">Phaser.DOM</a></li><li><a href="Phaser.Events.html">Phaser.Events</a></li><li><a href="Phaser.GameObjects.html">Phaser.GameObjects</a></li><li><a href="Phaser.GameObjects.Components.html">Phaser.GameObjects.Components</a></li><li><a href="Phaser.GameObjects.Components.Alpha.html">Phaser.GameObjects.Components.Alpha</a></li><li><a href="Phaser.GameObjects.Components.AlphaSingle.html">Phaser.GameObjects.Components.AlphaSingle</a></li><li><a href="Phaser.GameObjects.Components.BlendMode.html">Phaser.GameObjects.Components.BlendMode</a></li><li><a href="Phaser.GameObjects.Components.ComputedSize.html">Phaser.GameObjects.Components.ComputedSize</a></li><li><a href="Phaser.GameObjects.Components.Crop.html">Phaser.GameObjects.Components.Crop</a></li><li><a href="Phaser.GameObjects.Components.Depth.html">Phaser.GameObjects.Components.Depth</a></li><li><a href="Phaser.GameObjects.Components.Flip.html">Phaser.GameObjects.Components.Flip</a></li><li><a href="Phaser.GameObjects.Components.GetBounds.html">Phaser.GameObjects.Components.GetBounds</a></li><li><a href="Phaser.GameObjects.Components.Mask.html">Phaser.GameObjects.Components.Mask</a></li><li><a href="Phaser.GameObjects.Components.Origin.html">Phaser.GameObjects.Components.Origin</a></li><li><a href="Phaser.GameObjects.Components.PathFollower.html">Phaser.GameObjects.Components.PathFollower</a></li><li><a href="Phaser.GameObjects.Components.Pipeline.html">Phaser.GameObjects.Components.Pipeline</a></li><li><a href="Phaser.GameObjects.Components.ScrollFactor.html">Phaser.GameObjects.Components.ScrollFactor</a></li><li><a href="Phaser.GameObjects.Components.Size.html">Phaser.GameObjects.Components.Size</a></li><li><a href="Phaser.GameObjects.Components.Texture.html">Phaser.GameObjects.Components.Texture</a></li><li><a href="Phaser.GameObjects.Components.TextureCrop.html">Phaser.GameObjects.Components.TextureCrop</a></li><li><a href="Phaser.GameObjects.Components.Tint.html">Phaser.GameObjects.Components.Tint</a></li><li><a href="Phaser.GameObjects.Components.Transform.html">Phaser.GameObjects.Components.Transform</a></li><li><a href="Phaser.GameObjects.Components.Visible.html">Phaser.GameObjects.Components.Visible</a></li><li><a href="Phaser.GameObjects.Events.html">Phaser.GameObjects.Events</a></li><li><a href="Phaser.GameObjects.Particles.html">Phaser.GameObjects.Particles</a></li><li><a href="Phaser.GameObjects.Particles.Zones.html">Phaser.GameObjects.Particles.Zones</a></li><li><a href="Phaser.GameObjects.RetroFont.html">Phaser.GameObjects.RetroFont</a></li><li><a href="Phaser.Geom.html">Phaser.Geom</a></li><li><a href="Phaser.Geom.Intersects.html">Phaser.Geom.Intersects</a></li><li><a href="Phaser.Geom.Mesh.html">Phaser.Geom.Mesh</a></li><li><a href="Phaser.Input.html">Phaser.Input</a></li><li><a href="Phaser.Input.Events.html">Phaser.Input.Events</a></li><li><a href="Phaser.Input.Gamepad.html">Phaser.Input.Gamepad</a></li><li><a href="Phaser.Input.Gamepad.Configs.html">Phaser.Input.Gamepad.Configs</a></li><li><a href="Phaser.Input.Gamepad.Events.html">Phaser.Input.Gamepad.Events</a></li><li><a href="Phaser.Input.InputPluginCache.html">Phaser.Input.InputPluginCache</a></li><li><a href="Phaser.Input.Keyboard.html">Phaser.Input.Keyboard</a></li><li><a href="Phaser.Input.Keyboard.Events.html">Phaser.Input.Keyboard.Events</a></li><li><a href="Phaser.Input.Keyboard.KeyCodes.html">Phaser.Input.Keyboard.KeyCodes</a></li><li><a href="Phaser.Input.Mouse.html">Phaser.Input.Mouse</a></li><li><a href="Phaser.Input.Touch.html">Phaser.Input.Touch</a></li><li><a href="Phaser.Loader.html">Phaser.Loader</a></li><li><a href="Phaser.Loader.Events.html">Phaser.Loader.Events</a></li><li><a href="Phaser.Loader.FileTypes.html">Phaser.Loader.FileTypes</a></li><li><a href="Phaser.Loader.FileTypesManager.html">Phaser.Loader.FileTypesManager</a></li><li><a href="Phaser.Math.html">Phaser.Math</a></li><li><a href="Phaser.Math.Angle.html">Phaser.Math.Angle</a></li><li><a href="Phaser.Math.Distance.html">Phaser.Math.Distance</a></li><li><a href="Phaser.Math.Easing.html">Phaser.Math.Easing</a></li><li><a href="Phaser.Math.Easing.Back.html">Phaser.Math.Easing.Back</a></li><li><a href="Phaser.Math.Easing.Bounce.html">Phaser.Math.Easing.Bounce</a></li><li><a href="Phaser.Math.Easing.Circular.html">Phaser.Math.Easing.Circular</a></li><li><a href="Phaser.Math.Easing.Cubic.html">Phaser.Math.Easing.Cubic</a></li><li><a href="Phaser.Math.Easing.Elastic.html">Phaser.Math.Easing.Elastic</a></li><li><a href="Phaser.Math.Easing.Expo.html">Phaser.Math.Easing.Expo</a></li><li><a href="Phaser.Math.Easing.Quadratic.html">Phaser.Math.Easing.Quadratic</a></li><li><a href="Phaser.Math.Easing.Quartic.html">Phaser.Math.Easing.Quartic</a></li><li><a href="Phaser.Math.Easing.Quintic.html">Phaser.Math.Easing.Quintic</a></li><li><a href="Phaser.Math.Easing.Sine.html">Phaser.Math.Easing.Sine</a></li><li><a href="Phaser.Math.Easing.html#.Stepped">Phaser.Math.Easing.Stepped</a></li><li><a href="Phaser.Math.Fuzzy.html">Phaser.Math.Fuzzy</a></li><li><a href="Phaser.Math.Interpolation.html">Phaser.Math.Interpolation</a></li><li><a href="Phaser.Math.Pow2.html">Phaser.Math.Pow2</a></li><li><a href="Phaser.Math.Snap.html">Phaser.Math.Snap</a></li><li><a href="Phaser.Physics.html">Phaser.Physics</a></li><li><a href="Phaser.Physics.Arcade.html">Phaser.Physics.Arcade</a></li><li><a href="Phaser.Physics.Arcade.Components.html">Phaser.Physics.Arcade.Components</a></li><li><a href="Phaser.Physics.Arcade.Components.Acceleration.html">Phaser.Physics.Arcade.Components.Acceleration</a></li><li><a href="Phaser.Physics.Arcade.Components.Angular.html">Phaser.Physics.Arcade.Components.Angular</a></li><li><a href="Phaser.Physics.Arcade.Components.Bounce.html">Phaser.Physics.Arcade.Components.Bounce</a></li><li><a href="Phaser.Physics.Arcade.Components.Debug.html">Phaser.Physics.Arcade.Components.Debug</a></li><li><a href="Phaser.Physics.Arcade.Components.Drag.html">Phaser.Physics.Arcade.Components.Drag</a></li><li><a href="Phaser.Physics.Arcade.Components.Enable.html">Phaser.Physics.Arcade.Components.Enable</a></li><li><a href="Phaser.Physics.Arcade.Components.Friction.html">Phaser.Physics.Arcade.Components.Friction</a></li><li><a href="Phaser.Physics.Arcade.Components.Gravity.html">Phaser.Physics.Arcade.Components.Gravity</a></li><li><a href="Phaser.Physics.Arcade.Components.Immovable.html">Phaser.Physics.Arcade.Components.Immovable</a></li><li><a href="Phaser.Physics.Arcade.Components.Mass.html">Phaser.Physics.Arcade.Components.Mass</a></li><li><a href="Phaser.Physics.Arcade.Components.Pushable.html">Phaser.Physics.Arcade.Components.Pushable</a></li><li><a href="Phaser.Physics.Arcade.Components.Size.html">Phaser.Physics.Arcade.Components.Size</a></li><li><a href="Phaser.Physics.Arcade.Components.Velocity.html">Phaser.Physics.Arcade.Components.Velocity</a></li><li><a href="Phaser.Physics.Arcade.Events.html">Phaser.Physics.Arcade.Events</a></li><li><a href="Phaser.Physics.Arcade.Tilemap.html">Phaser.Physics.Arcade.Tilemap</a></li><li><a href="Phaser.Physics.Matter.html">Phaser.Physics.Matter</a></li><li><a href="Phaser.Physics.Matter.Components.html">Phaser.Physics.Matter.Components</a></li><li><a href="Phaser.Physics.Matter.Components.Bounce.html">Phaser.Physics.Matter.Components.Bounce</a></li><li><a href="Phaser.Physics.Matter.Components.Collision.html">Phaser.Physics.Matter.Components.Collision</a></li><li><a href="Phaser.Physics.Matter.Components.Force.html">Phaser.Physics.Matter.Components.Force</a></li><li><a href="Phaser.Physics.Matter.Components.Friction.html">Phaser.Physics.Matter.Components.Friction</a></li><li><a href="Phaser.Physics.Matter.Components.Gravity.html">Phaser.Physics.Matter.Components.Gravity</a></li><li><a href="Phaser.Physics.Matter.Components.Mass.html">Phaser.Physics.Matter.Components.Mass</a></li><li><a href="Phaser.Physics.Matter.Components.Sensor.html">Phaser.Physics.Matter.Components.Sensor</a></li><li><a href="Phaser.Physics.Matter.Components.SetBody.html">Phaser.Physics.Matter.Components.SetBody</a></li><li><a href="Phaser.Physics.Matter.Components.Sleep.html">Phaser.Physics.Matter.Components.Sleep</a></li><li><a href="Phaser.Physics.Matter.Components.Static.html">Phaser.Physics.Matter.Components.Static</a></li><li><a href="Phaser.Physics.Matter.Components.Transform.html">Phaser.Physics.Matter.Components.Transform</a></li><li><a href="Phaser.Physics.Matter.Components.Velocity.html">Phaser.Physics.Matter.Components.Velocity</a></li><li><a href="Phaser.Physics.Matter.Events.html">Phaser.Physics.Matter.Events</a></li><li><a href="Phaser.Physics.Matter.Matter.html">Phaser.Physics.Matter.Matter</a></li><li><a href="Phaser.Physics.Matter.PhysicsEditorParser.html">Phaser.Physics.Matter.PhysicsEditorParser</a></li><li><a href="Phaser.Physics.Matter.PhysicsJSONParser.html">Phaser.Physics.Matter.PhysicsJSONParser</a></li><li><a href="Phaser.Plugins.html">Phaser.Plugins</a></li><li><a href="Phaser.Plugins.DefaultPlugins.html">Phaser.Plugins.DefaultPlugins</a></li><li><a href="Phaser.Plugins.PluginCache.html">Phaser.Plugins.PluginCache</a></li><li><a href="Phaser.Renderer.html">Phaser.Renderer</a></li><li><a href="Phaser.Renderer.Canvas.html">Phaser.Renderer.Canvas</a></li><li><a href="Phaser.Renderer.Events.html">Phaser.Renderer.Events</a></li><li><a href="Phaser.Renderer.Snapshot.html">Phaser.Renderer.Snapshot</a></li><li><a href="Phaser.Renderer.WebGL.html">Phaser.Renderer.WebGL</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.html">Phaser.Renderer.WebGL.Pipelines</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html">Phaser.Renderer.WebGL.Pipelines.Events</a></li><li><a href="Phaser.Renderer.WebGL.Utils.html">Phaser.Renderer.WebGL.Utils</a></li><li><a href="Phaser.Scale.html">Phaser.Scale</a></li><li><a href="Phaser.Scale.Center.html">Phaser.Scale.Center</a></li><li><a href="Phaser.Scale.Events.html">Phaser.Scale.Events</a></li><li><a href="Phaser.Scale.Orientation.html">Phaser.Scale.Orientation</a></li><li><a href="Phaser.Scale.ScaleModes.html">Phaser.Scale.ScaleModes</a></li><li><a href="Phaser.Scale.Zoom.html">Phaser.Scale.Zoom</a></li><li><a href="Phaser.ScaleModes.html">Phaser.ScaleModes</a></li><li><a href="Phaser.Scenes.html">Phaser.Scenes</a></li><li><a href="Phaser.Scenes.Events.html">Phaser.Scenes.Events</a></li><li><a href="Phaser.Scenes.Settings.html">Phaser.Scenes.Settings</a></li><li><a href="Phaser.Sound.html">Phaser.Sound</a></li><li><a href="Phaser.Sound.Events.html">Phaser.Sound.Events</a></li><li><a href="Phaser.Structs.html">Phaser.Structs</a></li><li><a href="Phaser.Structs.Events.html">Phaser.Structs.Events</a></li><li><a href="Phaser.Textures.html">Phaser.Textures</a></li><li><a href="Phaser.Textures.Events.html">Phaser.Textures.Events</a></li><li><a href="Phaser.Textures.FilterMode.html">Phaser.Textures.FilterMode</a></li><li><a href="Phaser.Textures.Parsers.html">Phaser.Textures.Parsers</a></li><li><a href="Phaser.Tilemaps.html">Phaser.Tilemaps</a></li><li><a href="Phaser.Tilemaps.Components.html">Phaser.Tilemaps.Components</a></li><li><a href="Phaser.Tilemaps.Formats.html">Phaser.Tilemaps.Formats</a></li><li><a href="Phaser.Tilemaps.Orientation.html">Phaser.Tilemaps.Orientation</a></li><li><a href="Phaser.Tilemaps.Parsers.html">Phaser.Tilemaps.Parsers</a></li><li><a href="Phaser.Tilemaps.Parsers.Impact.html">Phaser.Tilemaps.Parsers.Impact</a></li><li><a href="Phaser.Tilemaps.Parsers.Tiled.html">Phaser.Tilemaps.Parsers.Tiled</a></li><li><a href="Phaser.Time.html">Phaser.Time</a></li><li><a href="Phaser.Tweens.html">Phaser.Tweens</a></li><li><a href="Phaser.Tweens.Builders.html">Phaser.Tweens.Builders</a></li><li><a href="Phaser.Tweens.Events.html">Phaser.Tweens.Events</a></li><li><a href="Phaser.Types.html">Phaser.Types</a></li><li><a href="Phaser.Types.Actions.html">Phaser.Types.Actions</a></li><li><a href="Phaser.Types.Animations.html">Phaser.Types.Animations</a></li><li><a href="Phaser.Types.Cameras.html">Phaser.Types.Cameras</a></li><li><a href="Phaser.Types.Cameras.Controls.html">Phaser.Types.Cameras.Controls</a></li><li><a href="Phaser.Types.Cameras.Scene2D.html">Phaser.Types.Cameras.Scene2D</a></li><li><a href="Phaser.Types.Core.html">Phaser.Types.Core</a></li><li><a href="Phaser.Types.Create.html">Phaser.Types.Create</a></li><li><a href="Phaser.Types.Curves.html">Phaser.Types.Curves</a></li><li><a href="Phaser.Types.Display.html">Phaser.Types.Display</a></li><li><a href="Phaser.Types.GameObjects.html">Phaser.Types.GameObjects</a></li><li><a href="Phaser.Types.GameObjects.BitmapText.html">Phaser.Types.GameObjects.BitmapText</a></li><li><a href="Phaser.Types.GameObjects.Graphics.html">Phaser.Types.GameObjects.Graphics</a></li><li><a href="Phaser.Types.GameObjects.Group.html">Phaser.Types.GameObjects.Group</a></li><li><a href="Phaser.Types.GameObjects.Particles.html">Phaser.Types.GameObjects.Particles</a></li><li><a href="Phaser.Types.GameObjects.PathFollower.html">Phaser.Types.GameObjects.PathFollower</a></li><li><a href="Phaser.Types.GameObjects.RenderTexture.html">Phaser.Types.GameObjects.RenderTexture</a></li><li><a href="Phaser.Types.GameObjects.Sprite.html">Phaser.Types.GameObjects.Sprite</a></li><li><a href="Phaser.Types.GameObjects.Text.html">Phaser.Types.GameObjects.Text</a></li><li><a href="Phaser.Types.GameObjects.TileSprite.html">Phaser.Types.GameObjects.TileSprite</a></li><li><a href="Phaser.Types.Geom.html">Phaser.Types.Geom</a></li><li><a href="Phaser.Types.Geom.Mesh.html">Phaser.Types.Geom.Mesh</a></li><li><a href="Phaser.Types.Input.html">Phaser.Types.Input</a></li><li><a href="Phaser.Types.Input.Gamepad.html">Phaser.Types.Input.Gamepad</a></li><li><a href="Phaser.Types.Input.Keyboard.html">Phaser.Types.Input.Keyboard</a></li><li><a href="Phaser.Types.Loader.html">Phaser.Types.Loader</a></li><li><a href="Phaser.Types.Loader.FileTypes.html">Phaser.Types.Loader.FileTypes</a></li><li><a href="Phaser.Types.Math.html">Phaser.Types.Math</a></li><li><a href="Phaser.Types.Physics.html">Phaser.Types.Physics</a></li><li><a href="Phaser.Types.Physics.Arcade.html">Phaser.Types.Physics.Arcade</a></li><li><a href="Phaser.Types.Physics.Matter.html">Phaser.Types.Physics.Matter</a></li><li><a href="Phaser.Types.Plugins.html">Phaser.Types.Plugins</a></li><li><a href="Phaser.Types.Renderer.html">Phaser.Types.Renderer</a></li><li><a href="Phaser.Types.Renderer.Snapshot.html">Phaser.Types.Renderer.Snapshot</a></li><li><a href="Phaser.Types.Renderer.WebGL.html">Phaser.Types.Renderer.WebGL</a></li><li><a href="Phaser.Types.Scenes.html">Phaser.Types.Scenes</a></li><li><a href="Phaser.Types.Sound.html">Phaser.Types.Sound</a></li><li><a href="Phaser.Types.Textures.html">Phaser.Types.Textures</a></li><li><a href="Phaser.Types.Tilemaps.html">Phaser.Types.Tilemaps</a></li><li><a href="Phaser.Types.Time.html">Phaser.Types.Time</a></li><li><a href="Phaser.Types.Tweens.html">Phaser.Types.Tweens</a></li><li><a href="Phaser.Utils.html">Phaser.Utils</a></li><li><a href="Phaser.Utils.Array.html">Phaser.Utils.Array</a></li><li><a href="Phaser.Utils.Array.Matrix.html">Phaser.Utils.Array.Matrix</a></li><li><a href="Phaser.Utils.Base64.html">Phaser.Utils.Base64</a></li><li><a href="Phaser.Utils.Objects.html">Phaser.Utils.Objects</a></li><li><a href="Phaser.Utils.String.html">Phaser.Utils.String</a></li><li><a href="SpinePluginEvents.html">SpinePluginEvents</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Camera3DPlugin.html">Camera3DPlugin</a></li><li><a href="global.html#Class">Class</a></li><li><a href="Phaser.Animations.Animation.html">Phaser.Animations.Animation</a></li><li><a href="Phaser.Animations.AnimationFrame.html">Phaser.Animations.AnimationFrame</a></li><li><a href="Phaser.Animations.AnimationManager.html">Phaser.Animations.AnimationManager</a></li><li><a href="Phaser.Animations.AnimationState.html">Phaser.Animations.AnimationState</a></li><li><a href="Phaser.Cache.BaseCache.html">Phaser.Cache.BaseCache</a></li><li><a href="Phaser.Cache.CacheManager.html">Phaser.Cache.CacheManager</a></li><li><a href="Phaser.Cameras.Controls.FixedKeyControl.html">Phaser.Cameras.Controls.FixedKeyControl</a></li><li><a href="Phaser.Cameras.Controls.SmoothedKeyControl.html">Phaser.Cameras.Controls.SmoothedKeyControl</a></li><li><a href="Phaser.Cameras.Scene2D.BaseCamera.html">Phaser.Cameras.Scene2D.BaseCamera</a></li><li><a href="Phaser.Cameras.Scene2D.Camera.html">Phaser.Cameras.Scene2D.Camera</a></li><li><a href="Phaser.Cameras.Scene2D.CameraManager.html">Phaser.Cameras.Scene2D.CameraManager</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.Fade.html">Phaser.Cameras.Scene2D.Effects.Fade</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.Flash.html">Phaser.Cameras.Scene2D.Effects.Flash</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.Pan.html">Phaser.Cameras.Scene2D.Effects.Pan</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.RotateTo.html">Phaser.Cameras.Scene2D.Effects.RotateTo</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.Shake.html">Phaser.Cameras.Scene2D.Effects.Shake</a></li><li><a href="Phaser.Cameras.Scene2D.Effects.Zoom.html">Phaser.Cameras.Scene2D.Effects.Zoom</a></li><li><a href="Phaser.Cameras.Sprite3D.Camera.html">Phaser.Cameras.Sprite3D.Camera</a></li><li><a href="Phaser.Cameras.Sprite3D.CameraManager.html">Phaser.Cameras.Sprite3D.CameraManager</a></li><li><a href="Phaser.Cameras.Sprite3D.OrthographicCamera.html">Phaser.Cameras.Sprite3D.OrthographicCamera</a></li><li><a href="Phaser.Cameras.Sprite3D.PerspectiveCamera.html">Phaser.Cameras.Sprite3D.PerspectiveCamera</a></li><li><a href="Phaser.Core.Config.html">Phaser.Core.Config</a></li><li><a href="Phaser.Core.TimeStep.html">Phaser.Core.TimeStep</a></li><li><a href="Phaser.Curves.CubicBezier.html">Phaser.Curves.CubicBezier</a></li><li><a href="Phaser.Curves.Curve.html">Phaser.Curves.Curve</a></li><li><a href="Phaser.Curves.Ellipse.html">Phaser.Curves.Ellipse</a></li><li><a href="Phaser.Curves.Line.html">Phaser.Curves.Line</a></li><li><a href="Phaser.Curves.MoveTo.html">Phaser.Curves.MoveTo</a></li><li><a href="Phaser.Curves.Path.html">Phaser.Curves.Path</a></li><li><a href="Phaser.Curves.QuadraticBezier.html">Phaser.Curves.QuadraticBezier</a></li><li><a href="Phaser.Curves.Spline.html">Phaser.Curves.Spline</a></li><li><a href="Phaser.Data.DataManager.html">Phaser.Data.DataManager</a></li><li><a href="Phaser.Data.DataManagerPlugin.html">Phaser.Data.DataManagerPlugin</a></li><li><a href="Phaser.Display.BaseShader.html">Phaser.Display.BaseShader</a></li><li><a href="Phaser.Display.Color.html">Phaser.Display.Color</a></li><li><a href="Phaser.Display.ColorMatrix.html">Phaser.Display.ColorMatrix</a></li><li><a href="Phaser.Display.Masks.BitmapMask.html">Phaser.Display.Masks.BitmapMask</a></li><li><a href="Phaser.Display.Masks.GeometryMask.html">Phaser.Display.Masks.GeometryMask</a></li><li><a href="Phaser.Display.RGB.html">Phaser.Display.RGB</a></li><li><a href="Phaser.DOM.RequestAnimationFrame.html">Phaser.DOM.RequestAnimationFrame</a></li><li><a href="Phaser.Events.EventEmitter.html">Phaser.Events.EventEmitter</a></li><li><a href="Phaser.FacebookInstantGamesLeaderboard.html">Phaser.FacebookInstantGamesLeaderboard</a></li><li><a href="Phaser.FacebookInstantGamesPlugin.html">Phaser.FacebookInstantGamesPlugin</a></li><li><a href="Phaser.Game.html">Phaser.Game</a></li><li><a href="Phaser.GameObjects.Arc.html">Phaser.GameObjects.Arc</a></li><li><a href="Phaser.GameObjects.BitmapText.html">Phaser.GameObjects.BitmapText</a></li><li><a href="Phaser.GameObjects.Blitter.html">Phaser.GameObjects.Blitter</a></li><li><a href="Phaser.GameObjects.Bob.html">Phaser.GameObjects.Bob</a></li><li><a href="Phaser.GameObjects.Components.TransformMatrix.html">Phaser.GameObjects.Components.TransformMatrix</a></li><li><a href="Phaser.GameObjects.Container.html">Phaser.GameObjects.Container</a></li><li><a href="Phaser.GameObjects.Curve.html">Phaser.GameObjects.Curve</a></li><li><a href="Phaser.GameObjects.DisplayList.html">Phaser.GameObjects.DisplayList</a></li><li><a href="Phaser.GameObjects.DOMElement.html">Phaser.GameObjects.DOMElement</a></li><li><a href="Phaser.GameObjects.DynamicBitmapText.html">Phaser.GameObjects.DynamicBitmapText</a></li><li><a href="Phaser.GameObjects.Ellipse.html">Phaser.GameObjects.Ellipse</a></li><li><a href="Phaser.GameObjects.Extern.html">Phaser.GameObjects.Extern</a></li><li><a href="Phaser.GameObjects.GameObject.html">Phaser.GameObjects.GameObject</a></li><li><a href="Phaser.GameObjects.GameObjectCreator.html">Phaser.GameObjects.GameObjectCreator</a></li><li><a href="Phaser.GameObjects.GameObjectFactory.html">Phaser.GameObjects.GameObjectFactory</a></li><li><a href="Phaser.GameObjects.Graphics.html">Phaser.GameObjects.Graphics</a></li><li><a href="Phaser.GameObjects.Grid.html">Phaser.GameObjects.Grid</a></li><li><a href="Phaser.GameObjects.Group.html">Phaser.GameObjects.Group</a></li><li><a href="Phaser.GameObjects.Image.html">Phaser.GameObjects.Image</a></li><li><a href="Phaser.GameObjects.IsoBox.html">Phaser.GameObjects.IsoBox</a></li><li><a href="Phaser.GameObjects.IsoTriangle.html">Phaser.GameObjects.IsoTriangle</a></li><li><a href="Phaser.GameObjects.Layer.html">Phaser.GameObjects.Layer</a></li><li><a href="Phaser.GameObjects.Light.html">Phaser.GameObjects.Light</a></li><li><a href="Phaser.GameObjects.LightsManager.html">Phaser.GameObjects.LightsManager</a></li><li><a href="Phaser.GameObjects.LightsPlugin.html">Phaser.GameObjects.LightsPlugin</a></li><li><a href="Phaser.GameObjects.Line.html">Phaser.GameObjects.Line</a></li><li><a href="Phaser.GameObjects.Mesh.html">Phaser.GameObjects.Mesh</a></li><li><a href="Phaser.GameObjects.Particles.EmitterOp.html">Phaser.GameObjects.Particles.EmitterOp</a></li><li><a href="Phaser.GameObjects.Particles.GravityWell.html">Phaser.GameObjects.Particles.GravityWell</a></li><li><a href="Phaser.GameObjects.Particles.Particle.html">Phaser.GameObjects.Particles.Particle</a></li><li><a href="Phaser.GameObjects.Particles.ParticleEmitter.html">Phaser.GameObjects.Particles.ParticleEmitter</a></li><li><a href="Phaser.GameObjects.Particles.ParticleEmitterManager.html">Phaser.GameObjects.Particles.ParticleEmitterManager</a></li><li><a href="Phaser.GameObjects.Particles.Zones.DeathZone.html">Phaser.GameObjects.Particles.Zones.DeathZone</a></li><li><a href="Phaser.GameObjects.Particles.Zones.EdgeZone.html">Phaser.GameObjects.Particles.Zones.EdgeZone</a></li><li><a href="Phaser.GameObjects.Particles.Zones.RandomZone.html">Phaser.GameObjects.Particles.Zones.RandomZone</a></li><li><a href="Phaser.GameObjects.PathFollower.html">Phaser.GameObjects.PathFollower</a></li><li><a href="Phaser.GameObjects.PointLight.html">Phaser.GameObjects.PointLight</a></li><li><a href="Phaser.GameObjects.Polygon.html">Phaser.GameObjects.Polygon</a></li><li><a href="Phaser.GameObjects.Rectangle.html">Phaser.GameObjects.Rectangle</a></li><li><a href="Phaser.GameObjects.RenderTexture.html">Phaser.GameObjects.RenderTexture</a></li><li><a href="Phaser.GameObjects.Rope.html">Phaser.GameObjects.Rope</a></li><li><a href="Phaser.GameObjects.Shader.html">Phaser.GameObjects.Shader</a></li><li><a href="Phaser.GameObjects.Shape.html">Phaser.GameObjects.Shape</a></li><li><a href="Phaser.GameObjects.Sprite.html">Phaser.GameObjects.Sprite</a></li><li><a href="Phaser.GameObjects.Sprite3D.html">Phaser.GameObjects.Sprite3D</a></li><li><a href="Phaser.GameObjects.Star.html">Phaser.GameObjects.Star</a></li><li><a href="Phaser.GameObjects.Text.html">Phaser.GameObjects.Text</a></li><li><a href="Phaser.GameObjects.TextStyle.html">Phaser.GameObjects.TextStyle</a></li><li><a href="Phaser.GameObjects.TileSprite.html">Phaser.GameObjects.TileSprite</a></li><li><a href="Phaser.GameObjects.Triangle.html">Phaser.GameObjects.Triangle</a></li><li><a href="Phaser.GameObjects.UpdateList.html">Phaser.GameObjects.UpdateList</a></li><li><a href="Phaser.GameObjects.Video.html">Phaser.GameObjects.Video</a></li><li><a href="Phaser.GameObjects.Zone.html">Phaser.GameObjects.Zone</a></li><li><a href="Phaser.Geom.Circle.html">Phaser.Geom.Circle</a></li><li><a href="Phaser.Geom.Ellipse.html">Phaser.Geom.Ellipse</a></li><li><a href="Phaser.Geom.Line.html">Phaser.Geom.Line</a></li><li><a href="Phaser.Geom.Mesh.Face.html">Phaser.Geom.Mesh.Face</a></li><li><a href="Phaser.Geom.Mesh.Vertex.html">Phaser.Geom.Mesh.Vertex</a></li><li><a href="Phaser.Geom.Point.html">Phaser.Geom.Point</a></li><li><a href="Phaser.Geom.Polygon.html">Phaser.Geom.Polygon</a></li><li><a href="Phaser.Geom.Rectangle.html">Phaser.Geom.Rectangle</a></li><li><a href="Phaser.Geom.Triangle.html">Phaser.Geom.Triangle</a></li><li><a href="Phaser.Input.Gamepad.Axis.html">Phaser.Input.Gamepad.Axis</a></li><li><a href="Phaser.Input.Gamepad.Button.html">Phaser.Input.Gamepad.Button</a></li><li><a href="Phaser.Input.Gamepad.Gamepad.html">Phaser.Input.Gamepad.Gamepad</a></li><li><a href="Phaser.Input.Gamepad.GamepadPlugin.html">Phaser.Input.Gamepad.GamepadPlugin</a></li><li><a href="Phaser.Input.InputManager.html">Phaser.Input.InputManager</a></li><li><a href="Phaser.Input.InputPlugin.html">Phaser.Input.InputPlugin</a></li><li><a href="Phaser.Input.Keyboard.Key.html">Phaser.Input.Keyboard.Key</a></li><li><a href="Phaser.Input.Keyboard.KeyboardManager.html">Phaser.Input.Keyboard.KeyboardManager</a></li><li><a href="Phaser.Input.Keyboard.KeyboardPlugin.html">Phaser.Input.Keyboard.KeyboardPlugin</a></li><li><a href="Phaser.Input.Keyboard.KeyCombo.html">Phaser.Input.Keyboard.KeyCombo</a></li><li><a href="Phaser.Input.Mouse.MouseManager.html">Phaser.Input.Mouse.MouseManager</a></li><li><a href="Phaser.Input.Pointer.html">Phaser.Input.Pointer</a></li><li><a href="Phaser.Input.Touch.TouchManager.html">Phaser.Input.Touch.TouchManager</a></li><li><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></li><li><a href="Phaser.Loader.FileTypes.AnimationJSONFile.html">Phaser.Loader.FileTypes.AnimationJSONFile</a></li><li><a href="Phaser.Loader.FileTypes.AsepriteFile.html">Phaser.Loader.FileTypes.AsepriteFile</a></li><li><a href="Phaser.Loader.FileTypes.AtlasJSONFile.html">Phaser.Loader.FileTypes.AtlasJSONFile</a></li><li><a href="Phaser.Loader.FileTypes.AtlasXMLFile.html">Phaser.Loader.FileTypes.AtlasXMLFile</a></li><li><a href="Phaser.Loader.FileTypes.AudioFile.html">Phaser.Loader.FileTypes.AudioFile</a></li><li><a href="Phaser.Loader.FileTypes.AudioSpriteFile.html">Phaser.Loader.FileTypes.AudioSpriteFile</a></li><li><a href="Phaser.Loader.FileTypes.BinaryFile.html">Phaser.Loader.FileTypes.BinaryFile</a></li><li><a href="Phaser.Loader.FileTypes.BitmapFontFile.html">Phaser.Loader.FileTypes.BitmapFontFile</a></li><li><a href="Phaser.Loader.FileTypes.CSSFile.html">Phaser.Loader.FileTypes.CSSFile</a></li><li><a href="Phaser.Loader.FileTypes.GLSLFile.html">Phaser.Loader.FileTypes.GLSLFile</a></li><li><a href="Phaser.Loader.FileTypes.HTML5AudioFile.html">Phaser.Loader.FileTypes.HTML5AudioFile</a></li><li><a href="Phaser.Loader.FileTypes.HTMLFile.html">Phaser.Loader.FileTypes.HTMLFile</a></li><li><a href="Phaser.Loader.FileTypes.HTMLTextureFile.html">Phaser.Loader.FileTypes.HTMLTextureFile</a></li><li><a href="Phaser.Loader.FileTypes.ImageFile.html">Phaser.Loader.FileTypes.ImageFile</a></li><li><a href="Phaser.Loader.FileTypes.JSONFile.html">Phaser.Loader.FileTypes.JSONFile</a></li><li><a href="Phaser.Loader.FileTypes.MultiAtlasFile.html">Phaser.Loader.FileTypes.MultiAtlasFile</a></li><li><a href="Phaser.Loader.FileTypes.MultiScriptFile.html">Phaser.Loader.FileTypes.MultiScriptFile</a></li><li><a href="Phaser.Loader.FileTypes.OBJFile.html">Phaser.Loader.FileTypes.OBJFile</a></li><li><a href="Phaser.Loader.FileTypes.PackFile.html">Phaser.Loader.FileTypes.PackFile</a></li><li><a href="Phaser.Loader.FileTypes.PluginFile.html">Phaser.Loader.FileTypes.PluginFile</a></li><li><a href="Phaser.Loader.FileTypes.SceneFile.html">Phaser.Loader.FileTypes.SceneFile</a></li><li><a href="Phaser.Loader.FileTypes.ScenePluginFile.html">Phaser.Loader.FileTypes.ScenePluginFile</a></li><li><a href="Phaser.Loader.FileTypes.ScriptFile.html">Phaser.Loader.FileTypes.ScriptFile</a></li><li><a href="Phaser.Loader.FileTypes.SpineFile.html">Phaser.Loader.FileTypes.SpineFile</a></li><li><a href="Phaser.Loader.FileTypes.SpriteSheetFile.html">Phaser.Loader.FileTypes.SpriteSheetFile</a></li><li><a href="Phaser.Loader.FileTypes.SVGFile.html">Phaser.Loader.FileTypes.SVGFile</a></li><li><a href="Phaser.Loader.FileTypes.TextFile.html">Phaser.Loader.FileTypes.TextFile</a></li><li><a href="Phaser.Loader.FileTypes.TilemapCSVFile.html">Phaser.Loader.FileTypes.TilemapCSVFile</a></li><li><a href="Phaser.Loader.FileTypes.TilemapImpactFile.html">Phaser.Loader.FileTypes.TilemapImpactFile</a></li><li><a href="Phaser.Loader.FileTypes.TilemapJSONFile.html">Phaser.Loader.FileTypes.TilemapJSONFile</a></li><li><a href="Phaser.Loader.FileTypes.UnityAtlasFile.html">Phaser.Loader.FileTypes.UnityAtlasFile</a></li><li><a href="Phaser.Loader.FileTypes.VideoFile.html">Phaser.Loader.FileTypes.VideoFile</a></li><li><a href="Phaser.Loader.FileTypes.XMLFile.html">Phaser.Loader.FileTypes.XMLFile</a></li><li><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></li><li><a href="Phaser.Loader.MultiFile.html">Phaser.Loader.MultiFile</a></li><li><a href="Phaser.Math.Euler.html">Phaser.Math.Euler</a></li><li><a href="Phaser.Math.Matrix3.html">Phaser.Math.Matrix3</a></li><li><a href="Phaser.Math.Matrix4.html">Phaser.Math.Matrix4</a></li><li><a href="Phaser.Math.Quaternion.html">Phaser.Math.Quaternion</a></li><li><a href="Phaser.Math.RandomDataGenerator.html">Phaser.Math.RandomDataGenerator</a></li><li><a href="Phaser.Math.Vector2.html">Phaser.Math.Vector2</a></li><li><a href="Phaser.Math.Vector3.html">Phaser.Math.Vector3</a></li><li><a href="Phaser.Math.Vector4.html">Phaser.Math.Vector4</a></li><li><a href="Phaser.Physics.Arcade.ArcadePhysics.html">Phaser.Physics.Arcade.ArcadePhysics</a></li><li><a href="Phaser.Physics.Arcade.Body.html">Phaser.Physics.Arcade.Body</a></li><li><a href="Phaser.Physics.Arcade.Collider.html">Phaser.Physics.Arcade.Collider</a></li><li><a href="Phaser.Physics.Arcade.Factory.html">Phaser.Physics.Arcade.Factory</a></li><li><a href="Phaser.Physics.Arcade.Group.html">Phaser.Physics.Arcade.Group</a></li><li><a href="Phaser.Physics.Arcade.Image.html">Phaser.Physics.Arcade.Image</a></li><li><a href="Phaser.Physics.Arcade.Sprite.html">Phaser.Physics.Arcade.Sprite</a></li><li><a href="Phaser.Physics.Arcade.StaticBody.html">Phaser.Physics.Arcade.StaticBody</a></li><li><a href="Phaser.Physics.Arcade.StaticGroup.html">Phaser.Physics.Arcade.StaticGroup</a></li><li><a href="Phaser.Physics.Arcade.World.html">Phaser.Physics.Arcade.World</a></li><li><a href="Phaser.Physics.Matter.BodyBounds.html">Phaser.Physics.Matter.BodyBounds</a></li><li><a href="Phaser.Physics.Matter.Factory.html">Phaser.Physics.Matter.Factory</a></li><li><a href="Phaser.Physics.Matter.Image.html">Phaser.Physics.Matter.Image</a></li><li><a href="Phaser.Physics.Matter.MatterPhysics.html">Phaser.Physics.Matter.MatterPhysics</a></li><li><a href="Phaser.Physics.Matter.PointerConstraint.html">Phaser.Physics.Matter.PointerConstraint</a></li><li><a href="Phaser.Physics.Matter.Sprite.html">Phaser.Physics.Matter.Sprite</a></li><li><a href="Phaser.Physics.Matter.TileBody.html">Phaser.Physics.Matter.TileBody</a></li><li><a href="Phaser.Physics.Matter.World.html">Phaser.Physics.Matter.World</a></li><li><a href="Phaser.Plugins.BasePlugin.html">Phaser.Plugins.BasePlugin</a></li><li><a href="Phaser.Plugins.PluginManager.html">Phaser.Plugins.PluginManager</a></li><li><a href="Phaser.Plugins.ScenePlugin.html">Phaser.Plugins.ScenePlugin</a></li><li><a href="Phaser.Renderer.Canvas.CanvasRenderer.html">Phaser.Renderer.Canvas.CanvasRenderer</a></li><li><a href="Phaser.Renderer.WebGL.PipelineManager.html">Phaser.Renderer.WebGL.PipelineManager</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline.html">Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline.html">Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.LightPipeline.html">Phaser.Renderer.WebGL.Pipelines.LightPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.MultiPipeline.html">Phaser.Renderer.WebGL.Pipelines.MultiPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.PointLightPipeline.html">Phaser.Renderer.WebGL.Pipelines.PointLightPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.PostFXPipeline.html">Phaser.Renderer.WebGL.Pipelines.PostFXPipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.RopePipeline.html">Phaser.Renderer.WebGL.Pipelines.RopePipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.SinglePipeline.html">Phaser.Renderer.WebGL.Pipelines.SinglePipeline</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.UtilityPipeline.html">Phaser.Renderer.WebGL.Pipelines.UtilityPipeline</a></li><li><a href="Phaser.Renderer.WebGL.RenderTarget.html">Phaser.Renderer.WebGL.RenderTarget</a></li><li><a href="Phaser.Renderer.WebGL.WebGLPipeline.html">Phaser.Renderer.WebGL.WebGLPipeline</a></li><li><a href="Phaser.Renderer.WebGL.WebGLRenderer.html">Phaser.Renderer.WebGL.WebGLRenderer</a></li><li><a href="Phaser.Renderer.WebGL.WebGLShader.html">Phaser.Renderer.WebGL.WebGLShader</a></li><li><a href="Phaser.Scale.ScaleManager.html">Phaser.Scale.ScaleManager</a></li><li><a href="Phaser.Scene.html">Phaser.Scene</a></li><li><a href="Phaser.Scenes.SceneManager.html">Phaser.Scenes.SceneManager</a></li><li><a href="Phaser.Scenes.ScenePlugin.html">Phaser.Scenes.ScenePlugin</a></li><li><a href="Phaser.Scenes.Systems.html">Phaser.Scenes.Systems</a></li><li><a href="Phaser.Sound.BaseSound.html">Phaser.Sound.BaseSound</a></li><li><a href="Phaser.Sound.BaseSoundManager.html">Phaser.Sound.BaseSoundManager</a></li><li><a href="Phaser.Sound.HTML5AudioSound.html">Phaser.Sound.HTML5AudioSound</a></li><li><a href="Phaser.Sound.HTML5AudioSoundManager.html">Phaser.Sound.HTML5AudioSoundManager</a></li><li><a href="Phaser.Sound.NoAudioSound.html">Phaser.Sound.NoAudioSound</a></li><li><a href="Phaser.Sound.NoAudioSoundManager.html">Phaser.Sound.NoAudioSoundManager</a></li><li><a href="Phaser.Sound.WebAudioSound.html">Phaser.Sound.WebAudioSound</a></li><li><a href="Phaser.Sound.WebAudioSoundManager.html">Phaser.Sound.WebAudioSoundManager</a></li><li><a href="Phaser.Structs.List.html">Phaser.Structs.List</a></li><li><a href="Phaser.Structs.Map.html">Phaser.Structs.Map</a></li><li><a href="Phaser.Structs.ProcessQueue.html">Phaser.Structs.ProcessQueue</a></li><li><a href="Phaser.Structs.RTree.html">Phaser.Structs.RTree</a></li><li><a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a></li><li><a href="Phaser.Structs.Size.html">Phaser.Structs.Size</a></li><li><a href="Phaser.Textures.CanvasTexture.html">Phaser.Textures.CanvasTexture</a></li><li><a href="Phaser.Textures.Frame.html">Phaser.Textures.Frame</a></li><li><a href="Phaser.Textures.Texture.html">Phaser.Textures.Texture</a></li><li><a href="Phaser.Textures.TextureManager.html">Phaser.Textures.TextureManager</a></li><li><a href="Phaser.Textures.TextureSource.html">Phaser.Textures.TextureSource</a></li><li><a href="Phaser.Tilemaps.ImageCollection.html">Phaser.Tilemaps.ImageCollection</a></li><li><a href="Phaser.Tilemaps.LayerData.html">Phaser.Tilemaps.LayerData</a></li><li><a href="Phaser.Tilemaps.MapData.html">Phaser.Tilemaps.MapData</a></li><li><a href="Phaser.Tilemaps.ObjectLayer.html">Phaser.Tilemaps.ObjectLayer</a></li><li><a href="Phaser.Tilemaps.Tile.html">Phaser.Tilemaps.Tile</a></li><li><a href="Phaser.Tilemaps.Tilemap.html">Phaser.Tilemaps.Tilemap</a></li><li><a href="Phaser.Tilemaps.TilemapLayer.html">Phaser.Tilemaps.TilemapLayer</a></li><li><a href="Phaser.Tilemaps.Tileset.html">Phaser.Tilemaps.Tileset</a></li><li><a href="Phaser.Time.Clock.html">Phaser.Time.Clock</a></li><li><a href="Phaser.Time.TimerEvent.html">Phaser.Time.TimerEvent</a></li><li><a href="Phaser.Tweens.Timeline.html">Phaser.Tweens.Timeline</a></li><li><a href="Phaser.Tweens.Tween.html">Phaser.Tweens.Tween</a></li><li><a href="Phaser.Tweens.TweenManager.html">Phaser.Tweens.TweenManager</a></li><li><a href="SpineContainer.html">SpineContainer</a></li><li><a href="SpineGameObject.html">SpineGameObject</a></li><li><a href="SpinePlugin.html">SpinePlugin</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Phaser.Animations.Events.html#event:ADD_ANIMATION">Phaser.Animations.Events#event:ADD_ANIMATION</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_COMPLETE">Phaser.Animations.Events#event:ANIMATION_COMPLETE</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_COMPLETE_KEY">Phaser.Animations.Events#event:ANIMATION_COMPLETE_KEY</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_REPEAT">Phaser.Animations.Events#event:ANIMATION_REPEAT</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_RESTART">Phaser.Animations.Events#event:ANIMATION_RESTART</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_START">Phaser.Animations.Events#event:ANIMATION_START</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_STOP">Phaser.Animations.Events#event:ANIMATION_STOP</a></li><li><a href="Phaser.Animations.Events.html#event:ANIMATION_UPDATE">Phaser.Animations.Events#event:ANIMATION_UPDATE</a></li><li><a href="Phaser.Animations.Events.html#event:PAUSE_ALL">Phaser.Animations.Events#event:PAUSE_ALL</a></li><li><a href="Phaser.Animations.Events.html#event:REMOVE_ANIMATION">Phaser.Animations.Events#event:REMOVE_ANIMATION</a></li><li><a href="Phaser.Animations.Events.html#event:RESUME_ALL">Phaser.Animations.Events#event:RESUME_ALL</a></li><li><a href="Phaser.Cache.Events.html#event:ADD">Phaser.Cache.Events#event:ADD</a></li><li><a href="Phaser.Cache.Events.html#event:REMOVE">Phaser.Cache.Events#event:REMOVE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:DESTROY">Phaser.Cameras.Scene2D.Events#event:DESTROY</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FADE_IN_COMPLETE">Phaser.Cameras.Scene2D.Events#event:FADE_IN_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FADE_IN_START">Phaser.Cameras.Scene2D.Events#event:FADE_IN_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FADE_OUT_COMPLETE">Phaser.Cameras.Scene2D.Events#event:FADE_OUT_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FADE_OUT_START">Phaser.Cameras.Scene2D.Events#event:FADE_OUT_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FLASH_COMPLETE">Phaser.Cameras.Scene2D.Events#event:FLASH_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FLASH_START">Phaser.Cameras.Scene2D.Events#event:FLASH_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:FOLLOW_UPDATE">Phaser.Cameras.Scene2D.Events#event:FOLLOW_UPDATE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:PAN_COMPLETE">Phaser.Cameras.Scene2D.Events#event:PAN_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:PAN_START">Phaser.Cameras.Scene2D.Events#event:PAN_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:POST_RENDER">Phaser.Cameras.Scene2D.Events#event:POST_RENDER</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:PRE_RENDER">Phaser.Cameras.Scene2D.Events#event:PRE_RENDER</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:ROTATE_COMPLETE">Phaser.Cameras.Scene2D.Events#event:ROTATE_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:ROTATE_START">Phaser.Cameras.Scene2D.Events#event:ROTATE_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:SHAKE_COMPLETE">Phaser.Cameras.Scene2D.Events#event:SHAKE_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:SHAKE_START">Phaser.Cameras.Scene2D.Events#event:SHAKE_START</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:ZOOM_COMPLETE">Phaser.Cameras.Scene2D.Events#event:ZOOM_COMPLETE</a></li><li><a href="Phaser.Cameras.Scene2D.Events.html#event:ZOOM_START">Phaser.Cameras.Scene2D.Events#event:ZOOM_START</a></li><li><a href="Phaser.Core.Events.html#event:BLUR">Phaser.Core.Events#event:BLUR</a></li><li><a href="Phaser.Core.Events.html#event:BOOT">Phaser.Core.Events#event:BOOT</a></li><li><a href="Phaser.Core.Events.html#event:CONTEXT_LOST">Phaser.Core.Events#event:CONTEXT_LOST</a></li><li><a href="Phaser.Core.Events.html#event:CONTEXT_RESTORED">Phaser.Core.Events#event:CONTEXT_RESTORED</a></li><li><a href="Phaser.Core.Events.html#event:DESTROY">Phaser.Core.Events#event:DESTROY</a></li><li><a href="Phaser.Core.Events.html#event:FOCUS">Phaser.Core.Events#event:FOCUS</a></li><li><a href="Phaser.Core.Events.html#event:HIDDEN">Phaser.Core.Events#event:HIDDEN</a></li><li><a href="Phaser.Core.Events.html#event:PAUSE">Phaser.Core.Events#event:PAUSE</a></li><li><a href="Phaser.Core.Events.html#event:POST_RENDER">Phaser.Core.Events#event:POST_RENDER</a></li><li><a href="Phaser.Core.Events.html#event:POST_STEP">Phaser.Core.Events#event:POST_STEP</a></li><li><a href="Phaser.Core.Events.html#event:PRE_RENDER">Phaser.Core.Events#event:PRE_RENDER</a></li><li><a href="Phaser.Core.Events.html#event:PRE_STEP">Phaser.Core.Events#event:PRE_STEP</a></li><li><a href="Phaser.Core.Events.html#event:READY">Phaser.Core.Events#event:READY</a></li><li><a href="Phaser.Core.Events.html#event:RESUME">Phaser.Core.Events#event:RESUME</a></li><li><a href="Phaser.Core.Events.html#event:STEP">Phaser.Core.Events#event:STEP</a></li><li><a href="Phaser.Core.Events.html#event:VISIBLE">Phaser.Core.Events#event:VISIBLE</a></li><li><a href="Phaser.Data.Events.html#event:CHANGE_DATA">Phaser.Data.Events#event:CHANGE_DATA</a></li><li><a href="Phaser.Data.Events.html#event:CHANGE_DATA_KEY">Phaser.Data.Events#event:CHANGE_DATA_KEY</a></li><li><a href="Phaser.Data.Events.html#event:DESTROY">Phaser.Data.Events#event:DESTROY</a></li><li><a href="Phaser.Data.Events.html#event:REMOVE_DATA">Phaser.Data.Events#event:REMOVE_DATA</a></li><li><a href="Phaser.Data.Events.html#event:SET_DATA">Phaser.Data.Events#event:SET_DATA</a></li><li><a href="Phaser.GameObjects.Events.html#event:ADDED_TO_SCENE">Phaser.GameObjects.Events#event:ADDED_TO_SCENE</a></li><li><a href="Phaser.GameObjects.Events.html#event:DESTROY">Phaser.GameObjects.Events#event:DESTROY</a></li><li><a href="Phaser.GameObjects.Events.html#event:REMOVED_FROM_SCENE">Phaser.GameObjects.Events#event:REMOVED_FROM_SCENE</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_COMPLETE">Phaser.GameObjects.Events#event:VIDEO_COMPLETE</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_CREATED">Phaser.GameObjects.Events#event:VIDEO_CREATED</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_ERROR">Phaser.GameObjects.Events#event:VIDEO_ERROR</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_LOOP">Phaser.GameObjects.Events#event:VIDEO_LOOP</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_PLAY">Phaser.GameObjects.Events#event:VIDEO_PLAY</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_SEEKED">Phaser.GameObjects.Events#event:VIDEO_SEEKED</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_SEEKING">Phaser.GameObjects.Events#event:VIDEO_SEEKING</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_STOP">Phaser.GameObjects.Events#event:VIDEO_STOP</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_TIMEOUT">Phaser.GameObjects.Events#event:VIDEO_TIMEOUT</a></li><li><a href="Phaser.GameObjects.Events.html#event:VIDEO_UNLOCKED">Phaser.GameObjects.Events#event:VIDEO_UNLOCKED</a></li><li><a href="Phaser.Input.Events.html#event:BOOT">Phaser.Input.Events#event:BOOT</a></li><li><a href="Phaser.Input.Events.html#event:DESTROY">Phaser.Input.Events#event:DESTROY</a></li><li><a href="Phaser.Input.Events.html#event:DRAG">Phaser.Input.Events#event:DRAG</a></li><li><a href="Phaser.Input.Events.html#event:DRAG_END">Phaser.Input.Events#event:DRAG_END</a></li><li><a href="Phaser.Input.Events.html#event:DRAG_ENTER">Phaser.Input.Events#event:DRAG_ENTER</a></li><li><a href="Phaser.Input.Events.html#event:DRAG_LEAVE">Phaser.Input.Events#event:DRAG_LEAVE</a></li><li><a href="Phaser.Input.Events.html#event:DRAG_OVER">Phaser.Input.Events#event:DRAG_OVER</a></li><li><a href="Phaser.Input.Events.html#event:DRAG_START">Phaser.Input.Events#event:DRAG_START</a></li><li><a href="Phaser.Input.Events.html#event:DROP">Phaser.Input.Events#event:DROP</a></li><li><a href="Phaser.Input.Events.html#event:GAME_OUT">Phaser.Input.Events#event:GAME_OUT</a></li><li><a href="Phaser.Input.Events.html#event:GAME_OVER">Phaser.Input.Events#event:GAME_OVER</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DOWN">Phaser.Input.Events#event:GAMEOBJECT_DOWN</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG">Phaser.Input.Events#event:GAMEOBJECT_DRAG</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG_END">Phaser.Input.Events#event:GAMEOBJECT_DRAG_END</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG_ENTER">Phaser.Input.Events#event:GAMEOBJECT_DRAG_ENTER</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG_LEAVE">Phaser.Input.Events#event:GAMEOBJECT_DRAG_LEAVE</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG_OVER">Phaser.Input.Events#event:GAMEOBJECT_DRAG_OVER</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DRAG_START">Phaser.Input.Events#event:GAMEOBJECT_DRAG_START</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_DROP">Phaser.Input.Events#event:GAMEOBJECT_DROP</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_MOVE">Phaser.Input.Events#event:GAMEOBJECT_MOVE</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_OUT">Phaser.Input.Events#event:GAMEOBJECT_OUT</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_OVER">Phaser.Input.Events#event:GAMEOBJECT_OVER</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_DOWN">Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_MOVE">Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_OUT">Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_OVER">Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_UP">Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_WHEEL">Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_UP">Phaser.Input.Events#event:GAMEOBJECT_UP</a></li><li><a href="Phaser.Input.Events.html#event:GAMEOBJECT_WHEEL">Phaser.Input.Events#event:GAMEOBJECT_WHEEL</a></li><li><a href="Phaser.Input.Events.html#event:MANAGER_BOOT">Phaser.Input.Events#event:MANAGER_BOOT</a></li><li><a href="Phaser.Input.Events.html#event:MANAGER_PROCESS">Phaser.Input.Events#event:MANAGER_PROCESS</a></li><li><a href="Phaser.Input.Events.html#event:MANAGER_UPDATE">Phaser.Input.Events#event:MANAGER_UPDATE</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_DOWN">Phaser.Input.Events#event:POINTER_DOWN</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_DOWN_OUTSIDE">Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_MOVE">Phaser.Input.Events#event:POINTER_MOVE</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_OUT">Phaser.Input.Events#event:POINTER_OUT</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_OVER">Phaser.Input.Events#event:POINTER_OVER</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_UP">Phaser.Input.Events#event:POINTER_UP</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_UP_OUTSIDE">Phaser.Input.Events#event:POINTER_UP_OUTSIDE</a></li><li><a href="Phaser.Input.Events.html#event:POINTER_WHEEL">Phaser.Input.Events#event:POINTER_WHEEL</a></li><li><a href="Phaser.Input.Events.html#event:POINTERLOCK_CHANGE">Phaser.Input.Events#event:POINTERLOCK_CHANGE</a></li><li><a href="Phaser.Input.Events.html#event:PRE_UPDATE">Phaser.Input.Events#event:PRE_UPDATE</a></li><li><a href="Phaser.Input.Events.html#event:SHUTDOWN">Phaser.Input.Events#event:SHUTDOWN</a></li><li><a href="Phaser.Input.Events.html#event:START">Phaser.Input.Events#event:START</a></li><li><a href="Phaser.Input.Events.html#event:UPDATE">Phaser.Input.Events#event:UPDATE</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:BUTTON_DOWN">Phaser.Input.Gamepad.Events#event:BUTTON_DOWN</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:BUTTON_UP">Phaser.Input.Gamepad.Events#event:BUTTON_UP</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:CONNECTED">Phaser.Input.Gamepad.Events#event:CONNECTED</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:DISCONNECTED">Phaser.Input.Gamepad.Events#event:DISCONNECTED</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:GAMEPAD_BUTTON_DOWN">Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN</a></li><li><a href="Phaser.Input.Gamepad.Events.html#event:GAMEPAD_BUTTON_UP">Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:ANY_KEY_DOWN">Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:ANY_KEY_UP">Phaser.Input.Keyboard.Events#event:ANY_KEY_UP</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:COMBO_MATCH">Phaser.Input.Keyboard.Events#event:COMBO_MATCH</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:DOWN">Phaser.Input.Keyboard.Events#event:DOWN</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:KEY_DOWN">Phaser.Input.Keyboard.Events#event:KEY_DOWN</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:KEY_UP">Phaser.Input.Keyboard.Events#event:KEY_UP</a></li><li><a href="Phaser.Input.Keyboard.Events.html#event:UP">Phaser.Input.Keyboard.Events#event:UP</a></li><li><a href="Phaser.Loader.Events.html#event:ADD">Phaser.Loader.Events#event:ADD</a></li><li><a href="Phaser.Loader.Events.html#event:COMPLETE">Phaser.Loader.Events#event:COMPLETE</a></li><li><a href="Phaser.Loader.Events.html#event:FILE_COMPLETE">Phaser.Loader.Events#event:FILE_COMPLETE</a></li><li><a href="Phaser.Loader.Events.html#event:FILE_KEY_COMPLETE">Phaser.Loader.Events#event:FILE_KEY_COMPLETE</a></li><li><a href="Phaser.Loader.Events.html#event:FILE_LOAD">Phaser.Loader.Events#event:FILE_LOAD</a></li><li><a href="Phaser.Loader.Events.html#event:FILE_LOAD_ERROR">Phaser.Loader.Events#event:FILE_LOAD_ERROR</a></li><li><a href="Phaser.Loader.Events.html#event:FILE_PROGRESS">Phaser.Loader.Events#event:FILE_PROGRESS</a></li><li><a href="Phaser.Loader.Events.html#event:POST_PROCESS">Phaser.Loader.Events#event:POST_PROCESS</a></li><li><a href="Phaser.Loader.Events.html#event:PROGRESS">Phaser.Loader.Events#event:PROGRESS</a></li><li><a href="Phaser.Loader.Events.html#event:START">Phaser.Loader.Events#event:START</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:COLLIDE">Phaser.Physics.Arcade.Events#event:COLLIDE</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:OVERLAP">Phaser.Physics.Arcade.Events#event:OVERLAP</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:PAUSE">Phaser.Physics.Arcade.Events#event:PAUSE</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:RESUME">Phaser.Physics.Arcade.Events#event:RESUME</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:TILE_COLLIDE">Phaser.Physics.Arcade.Events#event:TILE_COLLIDE</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:TILE_OVERLAP">Phaser.Physics.Arcade.Events#event:TILE_OVERLAP</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:WORLD_BOUNDS">Phaser.Physics.Arcade.Events#event:WORLD_BOUNDS</a></li><li><a href="Phaser.Physics.Arcade.Events.html#event:WORLD_STEP">Phaser.Physics.Arcade.Events#event:WORLD_STEP</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:AFTER_ADD">Phaser.Physics.Matter.Events#event:AFTER_ADD</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:AFTER_REMOVE">Phaser.Physics.Matter.Events#event:AFTER_REMOVE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:AFTER_UPDATE">Phaser.Physics.Matter.Events#event:AFTER_UPDATE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:BEFORE_ADD">Phaser.Physics.Matter.Events#event:BEFORE_ADD</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:BEFORE_REMOVE">Phaser.Physics.Matter.Events#event:BEFORE_REMOVE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:BEFORE_UPDATE">Phaser.Physics.Matter.Events#event:BEFORE_UPDATE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:COLLISION_ACTIVE">Phaser.Physics.Matter.Events#event:COLLISION_ACTIVE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:COLLISION_END">Phaser.Physics.Matter.Events#event:COLLISION_END</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:COLLISION_START">Phaser.Physics.Matter.Events#event:COLLISION_START</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:DRAG">Phaser.Physics.Matter.Events#event:DRAG</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:DRAG_END">Phaser.Physics.Matter.Events#event:DRAG_END</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:DRAG_START">Phaser.Physics.Matter.Events#event:DRAG_START</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:PAUSE">Phaser.Physics.Matter.Events#event:PAUSE</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:RESUME">Phaser.Physics.Matter.Events#event:RESUME</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:SLEEP_END">Phaser.Physics.Matter.Events#event:SLEEP_END</a></li><li><a href="Phaser.Physics.Matter.Events.html#event:SLEEP_START">Phaser.Physics.Matter.Events#event:SLEEP_START</a></li><li><a href="Phaser.Renderer.Events.html#event:POST_RENDER">Phaser.Renderer.Events#event:POST_RENDER</a></li><li><a href="Phaser.Renderer.Events.html#event:PRE_RENDER">Phaser.Renderer.Events#event:PRE_RENDER</a></li><li><a href="Phaser.Renderer.Events.html#event:RENDER">Phaser.Renderer.Events#event:RENDER</a></li><li><a href="Phaser.Renderer.Events.html#event:RESIZE">Phaser.Renderer.Events#event:RESIZE</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:AFTER_FLUSH">Phaser.Renderer.WebGL.Pipelines.Events#event:AFTER_FLUSH</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:BEFORE_FLUSH">Phaser.Renderer.WebGL.Pipelines.Events#event:BEFORE_FLUSH</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:BIND">Phaser.Renderer.WebGL.Pipelines.Events#event:BIND</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:BOOT">Phaser.Renderer.WebGL.Pipelines.Events#event:BOOT</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:DESTROY">Phaser.Renderer.WebGL.Pipelines.Events#event:DESTROY</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:REBIND">Phaser.Renderer.WebGL.Pipelines.Events#event:REBIND</a></li><li><a href="Phaser.Renderer.WebGL.Pipelines.Events.html#event:RESIZE">Phaser.Renderer.WebGL.Pipelines.Events#event:RESIZE</a></li><li><a href="Phaser.Scale.Events.html#event:ENTER_FULLSCREEN">Phaser.Scale.Events#event:ENTER_FULLSCREEN</a></li><li><a href="Phaser.Scale.Events.html#event:FULLSCREEN_FAILED">Phaser.Scale.Events#event:FULLSCREEN_FAILED</a></li><li><a href="Phaser.Scale.Events.html#event:FULLSCREEN_UNSUPPORTED">Phaser.Scale.Events#event:FULLSCREEN_UNSUPPORTED</a></li><li><a href="Phaser.Scale.Events.html#event:LEAVE_FULLSCREEN">Phaser.Scale.Events#event:LEAVE_FULLSCREEN</a></li><li><a href="Phaser.Scale.Events.html#event:ORIENTATION_CHANGE">Phaser.Scale.Events#event:ORIENTATION_CHANGE</a></li><li><a href="Phaser.Scale.Events.html#event:RESIZE">Phaser.Scale.Events#event:RESIZE</a></li><li><a href="Phaser.Scenes.Events.html#event:ADDED_TO_SCENE">Phaser.Scenes.Events#event:ADDED_TO_SCENE</a></li><li><a href="Phaser.Scenes.Events.html#event:BOOT">Phaser.Scenes.Events#event:BOOT</a></li><li><a href="Phaser.Scenes.Events.html#event:CREATE">Phaser.Scenes.Events#event:CREATE</a></li><li><a href="Phaser.Scenes.Events.html#event:DESTROY">Phaser.Scenes.Events#event:DESTROY</a></li><li><a href="Phaser.Scenes.Events.html#event:PAUSE">Phaser.Scenes.Events#event:PAUSE</a></li><li><a href="Phaser.Scenes.Events.html#event:POST_UPDATE">Phaser.Scenes.Events#event:POST_UPDATE</a></li><li><a href="Phaser.Scenes.Events.html#event:PRE_UPDATE">Phaser.Scenes.Events#event:PRE_UPDATE</a></li><li><a href="Phaser.Scenes.Events.html#event:READY">Phaser.Scenes.Events#event:READY</a></li><li><a href="Phaser.Scenes.Events.html#event:REMOVED_FROM_SCENE">Phaser.Scenes.Events#event:REMOVED_FROM_SCENE</a></li><li><a href="Phaser.Scenes.Events.html#event:RENDER">Phaser.Scenes.Events#event:RENDER</a></li><li><a href="Phaser.Scenes.Events.html#event:RESUME">Phaser.Scenes.Events#event:RESUME</a></li><li><a href="Phaser.Scenes.Events.html#event:SHUTDOWN">Phaser.Scenes.Events#event:SHUTDOWN</a></li><li><a href="Phaser.Scenes.Events.html#event:SLEEP">Phaser.Scenes.Events#event:SLEEP</a></li><li><a href="Phaser.Scenes.Events.html#event:START">Phaser.Scenes.Events#event:START</a></li><li><a href="Phaser.Scenes.Events.html#event:TRANSITION_COMPLETE">Phaser.Scenes.Events#event:TRANSITION_COMPLETE</a></li><li><a href="Phaser.Scenes.Events.html#event:TRANSITION_INIT">Phaser.Scenes.Events#event:TRANSITION_INIT</a></li><li><a href="Phaser.Scenes.Events.html#event:TRANSITION_OUT">Phaser.Scenes.Events#event:TRANSITION_OUT</a></li><li><a href="Phaser.Scenes.Events.html#event:TRANSITION_START">Phaser.Scenes.Events#event:TRANSITION_START</a></li><li><a href="Phaser.Scenes.Events.html#event:TRANSITION_WAKE">Phaser.Scenes.Events#event:TRANSITION_WAKE</a></li><li><a href="Phaser.Scenes.Events.html#event:UPDATE">Phaser.Scenes.Events#event:UPDATE</a></li><li><a href="Phaser.Scenes.Events.html#event:WAKE">Phaser.Scenes.Events#event:WAKE</a></li><li><a href="Phaser.Sound.Events.html#event:COMPLETE">Phaser.Sound.Events#event:COMPLETE</a></li><li><a href="Phaser.Sound.Events.html#event:DECODED">Phaser.Sound.Events#event:DECODED</a></li><li><a href="Phaser.Sound.Events.html#event:DECODED_ALL">Phaser.Sound.Events#event:DECODED_ALL</a></li><li><a href="Phaser.Sound.Events.html#event:DESTROY">Phaser.Sound.Events#event:DESTROY</a></li><li><a href="Phaser.Sound.Events.html#event:DETUNE">Phaser.Sound.Events#event:DETUNE</a></li><li><a href="Phaser.Sound.Events.html#event:GLOBAL_DETUNE">Phaser.Sound.Events#event:GLOBAL_DETUNE</a></li><li><a href="Phaser.Sound.Events.html#event:GLOBAL_MUTE">Phaser.Sound.Events#event:GLOBAL_MUTE</a></li><li><a href="Phaser.Sound.Events.html#event:GLOBAL_RATE">Phaser.Sound.Events#event:GLOBAL_RATE</a></li><li><a href="Phaser.Sound.Events.html#event:GLOBAL_VOLUME">Phaser.Sound.Events#event:GLOBAL_VOLUME</a></li><li><a href="Phaser.Sound.Events.html#event:LOOP">Phaser.Sound.Events#event:LOOP</a></li><li><a href="Phaser.Sound.Events.html#event:LOOPED">Phaser.Sound.Events#event:LOOPED</a></li><li><a href="Phaser.Sound.Events.html#event:MUTE">Phaser.Sound.Events#event:MUTE</a></li><li><a href="Phaser.Sound.Events.html#event:PAN">Phaser.Sound.Events#event:PAN</a></li><li><a href="Phaser.Sound.Events.html#event:PAUSE">Phaser.Sound.Events#event:PAUSE</a></li><li><a href="Phaser.Sound.Events.html#event:PAUSE_ALL">Phaser.Sound.Events#event:PAUSE_ALL</a></li><li><a href="Phaser.Sound.Events.html#event:PLAY">Phaser.Sound.Events#event:PLAY</a></li><li><a href="Phaser.Sound.Events.html#event:RATE">Phaser.Sound.Events#event:RATE</a></li><li><a href="Phaser.Sound.Events.html#event:RESUME">Phaser.Sound.Events#event:RESUME</a></li><li><a href="Phaser.Sound.Events.html#event:RESUME_ALL">Phaser.Sound.Events#event:RESUME_ALL</a></li><li><a href="Phaser.Sound.Events.html#event:SEEK">Phaser.Sound.Events#event:SEEK</a></li><li><a href="Phaser.Sound.Events.html#event:STOP">Phaser.Sound.Events#event:STOP</a></li><li><a href="Phaser.Sound.Events.html#event:STOP_ALL">Phaser.Sound.Events#event:STOP_ALL</a></li><li><a href="Phaser.Sound.Events.html#event:UNLOCKED">Phaser.Sound.Events#event:UNLOCKED</a></li><li><a href="Phaser.Sound.Events.html#event:VOLUME">Phaser.Sound.Events#event:VOLUME</a></li><li><a href="Phaser.Structs.Events.html#event:PROCESS_QUEUE_ADD">Phaser.Structs.Events#event:PROCESS_QUEUE_ADD</a></li><li><a href="Phaser.Structs.Events.html#event:PROCESS_QUEUE_REMOVE">Phaser.Structs.Events#event:PROCESS_QUEUE_REMOVE</a></li><li><a href="Phaser.Textures.Events.html#event:ADD">Phaser.Textures.Events#event:ADD</a></li><li><a href="Phaser.Textures.Events.html#event:ERROR">Phaser.Textures.Events#event:ERROR</a></li><li><a href="Phaser.Textures.Events.html#event:LOAD">Phaser.Textures.Events#event:LOAD</a></li><li><a href="Phaser.Textures.Events.html#event:READY">Phaser.Textures.Events#event:READY</a></li><li><a href="Phaser.Textures.Events.html#event:REMOVE">Phaser.Textures.Events#event:REMOVE</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_COMPLETE">Phaser.Tweens.Events#event:TIMELINE_COMPLETE</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_LOOP">Phaser.Tweens.Events#event:TIMELINE_LOOP</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_PAUSE">Phaser.Tweens.Events#event:TIMELINE_PAUSE</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_RESUME">Phaser.Tweens.Events#event:TIMELINE_RESUME</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_START">Phaser.Tweens.Events#event:TIMELINE_START</a></li><li><a href="Phaser.Tweens.Events.html#event:TIMELINE_UPDATE">Phaser.Tweens.Events#event:TIMELINE_UPDATE</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_ACTIVE">Phaser.Tweens.Events#event:TWEEN_ACTIVE</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_COMPLETE">Phaser.Tweens.Events#event:TWEEN_COMPLETE</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_LOOP">Phaser.Tweens.Events#event:TWEEN_LOOP</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_REPEAT">Phaser.Tweens.Events#event:TWEEN_REPEAT</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_START">Phaser.Tweens.Events#event:TWEEN_START</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_STOP">Phaser.Tweens.Events#event:TWEEN_STOP</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_UPDATE">Phaser.Tweens.Events#event:TWEEN_UPDATE</a></li><li><a href="Phaser.Tweens.Events.html#event:TWEEN_YOYO">Phaser.Tweens.Events#event:TWEEN_YOYO</a></li><li><a href="SpinePluginEvents.html#event:COMPLETE">SpinePluginEvents#event:COMPLETE</a></li><li><a href="SpinePluginEvents.html#event:DISPOSE">SpinePluginEvents#event:DISPOSE</a></li><li><a href="SpinePluginEvents.html#event:END">SpinePluginEvents#event:END</a></li><li><a href="SpinePluginEvents.html#event:EVENT">SpinePluginEvents#event:EVENT</a></li><li><a href="SpinePluginEvents.html#event:INTERRUPTED">SpinePluginEvents#event:INTERRUPTED</a></li><li><a href="SpinePluginEvents.html#event:START">SpinePluginEvents#event:START</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="Phaser.GameObjects.html" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Phaser.GameObjects.GameObject.html">Base Game Object</a></li><li><a href="Phaser.GameObjects.GameObjectFactory.html">Game Object Factory</a></li><li><a href="Phaser.GameObjects.GameObjectCreator.html">Game Object Creator</a></li><li>&nbsp;</li><li><a href="Phaser.GameObjects.BitmapText.html">Bitmap Text (Static)</a></li><li><a href="Phaser.GameObjects.DynamicBitmapText.html">Bitmap Text (Dynamic)</a></li><li><a href="Phaser.GameObjects.Blitter.html">Blitter</a></li><li><a href="Phaser.GameObjects.Blitter.Bob.html">Bob (Blitter Object)</a></li><li><a href="Phaser.GameObjects.Container.html">Container</a></li><li><a href="Phaser.GameObjects.DOMElement.html">DOM Element</a></li><li><a href="Phaser.GameObjects.Extern.html">Extern</a></li><li><a href="Phaser.GameObjects.Graphics.html">Graphics</a></li><li><a href="Phaser.GameObjects.Group.html">Group</a></li><li><a href="Phaser.GameObjects.Image.html">Image</a></li><li><a href="Phaser.GameObjects.Layer.html">Layer</a></li><li><a href="Phaser.GameObjects.Particles.ParticleEmitter.html">Particle Emitter</a></li><li><a href="Phaser.GameObjects.Particles.ParticleEmitterManager.html">Particle Emitter Manager</a></li><li><a href="Phaser.GameObjects.PathFollower.html">Path Follower</a></li><li><a href="Phaser.GameObjects.PointLight.html">Point Light</a></li><li><a href="Phaser.GameObjects.RenderTexture.html">Render Texture</a></li><li><a href="Phaser.GameObjects.Shape.html">Shape</a></li><li><a href="Phaser.GameObjects.Sprite.html">Sprite</a></li><li><a href="Phaser.GameObjects.Text.html">Text</a></li><li><a href="Phaser.Tilemaps.Tilemap.html">Tilemap</a></li><li><a href="Phaser.Tilemaps.TilemapLayer.html">Tilemap Layer</a></li><li><a href="Phaser.GameObjects.TileSprite.html">TileSprite</a></li><li><a href="Phaser.GameObjects.Video.html">Video</a></li><li><a href="Phaser.GameObjects.Zone.html">Zone</a></li><li>&nbsp;</li><li><a href="Phaser.GameObjects.Arc.html">Arc</a></li><li><a href="Phaser.GameObjects.Curve.html">Curve</a></li><li><a href="Phaser.GameObjects.Ellipse.html">Ellipse</a></li><li><a href="Phaser.GameObjects.Grid.html">Grid</a></li><li><a href="Phaser.GameObjects.IsoBox.html">IsoBox</a></li><li><a href="Phaser.GameObjects.IsoTriangle.html">IsoTriangle</a></li><li><a href="Phaser.GameObjects.Line.html">Line</a></li><li><a href="Phaser.GameObjects.Polygon.html">Polygon</a></li><li><a href="Phaser.GameObjects.Rectangle.html">Rectangle</a></li><li><a href="Phaser.GameObjects.Star.html">Star</a></li><li><a href="Phaser.GameObjects.Triangle.html">Triangle</a></li><li>&nbsp;</li><li><a href="Phaser.GameObjects.Rope.html">Rope (WebGL only)</a></li><li><a href="Phaser.GameObjects.Shader.html">Shader (WebGL only)</a></li><li><a href="Phaser.GameObjects.LightsPlugin.html">Lights (WebGL only)</a></li><li><a href="Phaser.GameObjects.Mesh.html">Mesh (WebGL only)</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="Phaser.Physics.html" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Phaser.Physics.Arcade.html"><strong>Arcade Physics</strong></a></li><li><a href="Phaser.Physics.Arcade.Factory.html">Arcade Physics Factory</a></li><li><a href="Phaser.Physics.Arcade.World.html">Arcade Physics World</a></li><li><a href="Phaser.Physics.Arcade.Image.html">Arcade Physics Image</a></li><li><a href="Phaser.Physics.Arcade.Sprite.html">Arcade Physics Sprite</a></li><li><a href="Phaser.Physics.Arcade.Group.html">Arcade Physics Group</a></li><li>&nbsp;</li><li><a href="Phaser.Physics.Matter.MatterPhysics.html"><strong>Matter Physics</strong></a></li><li><a href="Phaser.Physics.Matter.Factory.html">Matter Physics Factory</a></li><li><a href="Phaser.Physics.Matter.World.html">Matter Physics World</a></li><li><a href="Phaser.Physics.Matter.Image.html">Matter Physics Image</a></li><li><a href="Phaser.Physics.Matter.Sprite.html">Matter Physics Sprite</a></li><li><a href="Phaser.Physics.Matter.PointerConstraint.html">Matter Physics Pointer Constraint</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="Phaser.Scene.html" class="dropdown-toggle" data-toggle="dropdown">Scene<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Phaser.Scene.html">Scene</a></li><li><a href="Phaser.Scenes.ScenePlugin.html">Scene Plugin</a></li><li><a href="Phaser.Scenes.Systems.html">Scene Systems</a></li><li><a href="Phaser.Types.Scenes.html#.SettingsConfig">Scene Configuration</a></li><li>&nbsp;</li><li><a href="Phaser.GameObjects.GameObjectFactory.html">add</a></li><li><a href="Phaser.Animations.AnimationManager.html">anims</a></li><li><a href="Phaser.Cache.CacheManager.html">cache</a></li><li><a href="Phaser.Cameras.Scene2D.CameraManager.html">cameras</a></li><li><a href="Phaser.GameObjects.DisplayList.html">children</a></li><li><a href="Phaser.Data.DataManager.html">data</a></li><li><a href="Phaser.Events.EventEmitter.html">events</a></li><li><a href="Phaser.FacebookInstantGamesPlugin.html">facebook</a></li><li><a href="Phaser.Game.html">game</a></li><li><a href="Phaser.Physics.Impact.ImpactPhysics.html">impact</a></li><li><a href="Phaser.Input.InputPlugin.html">input</a></li><li><a href="Phaser.GameObjects.LightsManager.html">lights</a></li><li><a href="Phaser.Loader.LoaderPlugin.html">load</a></li><li><a href="Phaser.GameObjects.GameObjectCreator.html">make</a></li><li><a href="Phaser.Physics.Matter.MatterPhysics.html">matter</a></li><li><a href="Phaser.Physics.Arcade.ArcadePhysics.html">physics</a></li><li><a href="Phaser.Plugins.PluginManager.html">plugins</a></li><li><a href="Phaser.Data.DataManager.html">registry</a></li><li><a href="Phaser.Scale.ScaleManager.html">scale</a></li><li><a href="Phaser.Scenes.ScenePlugin.html">scene</a></li><li><a href="Phaser.Sound.BaseSoundManager.html">sound</a></li><li><a href="Phaser.Scenes.Systems.html">sys</a></li><li><a href="Phaser.Textures.TextureManager.html">textures</a></li><li><a href="Phaser.Time.Clock.html">time</a></li><li><a href="Phaser.Tweens.TweenManager.html">tweens</a></li>
				</ul>
			</li>
			
		</ul>
        
            <div class="col-sm-3 col-md-3">
                <form class="navbar-form" role="search">
                    <div class="input-group">
                        <input type="text" class="form-control loading" placeholder="Search" name="q" id="search-input" disabled>
                        <div class="input-group-btn">
                            <button class="btn btn-default" id="search-submit" disabled><i class="glyphicon glyphicon-search"></i></button>
                        </div>
                    </div>
                </form>
            </div>
        
	</div>

</div>
</div>

<div class="container" id="toc-content">
<div class="row">

	
	<div class="col-md-8">
	
		<div id="main">
			

	<h1 class="page-title">Class: LoaderPlugin</h1>
<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="Phaser.html">Phaser</a><a href="Phaser.Loader.html">.Loader</a>.</span>
        
        LoaderPlugin
        </h2>
        
            <div class="class-description"><p>The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.
You typically interact with it via <code>this.load</code> in your Scene. Scenes can have a <code>preload</code> method, which is always
called before the Scenes <code>create</code> method, allowing you to preload assets that the Scene may need.</p>
<p>If you call any <code>this.load</code> methods from outside of <code>Scene.preload</code> then you need to start the Loader going
yourself by calling <code>Loader.start()</code>. It's only automatically started during the Scene preload.</p>
<p>The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events.
Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration.</p>
<p>Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader
event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished
simply adding a new file to it, while running, will ensure it's added into the current queue.</p>
<p>Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However,
assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that
file inside <code>Game.cache.xml</code>, which is accessible from every Scene in your game, no matter who was responsible
for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes
in your game.</p>
<p>The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader
when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes.
See those files for more details.</p></div>
        
    
</header>


<article>
    <div class="container-overview">
    
        
<hr>
<dt>
    <h4 class="name" id="LoaderPlugin"><span class="type-signature"></span>new LoaderPlugin(scene)</h4>
    
    
</dt>
<dd>

    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Scene.html">Phaser.Scene</a></span>



            
            </td>

            

            

            <td class="description last"><p>The Scene which owns this Loader instance.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L18">Line 18</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    
        <h3 class="subsection-title">Extends</h3>

        


    <ul>
        <li><a href="Phaser.Events.EventEmitter.html">Phaser.Events.EventEmitter</a></li>
    </ul>


    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            
<hr>
<dt class="name" id="baseURL">
    <h4 id="baseURL"><span class="type-signature"></span>baseURL<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>If you want to append a URL before the path of any asset you can set this here.</p>
<p>Useful if allowing the asset base url to be configured outside of the game code.</p>
<p>If you set this property directly then it <em>must</em> end with a &quot;/&quot;. Alternatively, call <code>setBaseURL()</code> and it'll do it for you.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>''</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L152">Line 152</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="cacheManager">
    <h4 id="cacheManager"><span class="type-signature"></span>cacheManager<span class="type-signature"> :<a href="Phaser.Cache.CacheManager.html">Phaser.Cache.CacheManager</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>A reference to the global Cache Manager.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Cache.CacheManager.html">Phaser.Cache.CacheManager</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L83">Line 83</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="crossOrigin">
    <h4 id="crossOrigin"><span class="type-signature"></span>crossOrigin<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L201">Line 201</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="inflight">
    <h4 id="inflight"><span class="type-signature"></span>inflight<span class="type-signature"> :<a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Files are stored in this Set while they're in the process of being loaded.</p>
<p>Upon a successful load they are moved to the <code>queue</code> Set.</p>
<p>By the end of the load process this Set will be empty.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L247">Line 247</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="list">
    <h4 id="list"><span class="type-signature"></span>list<span class="type-signature"> :<a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Files are placed in this Set when they're added to the Loader via <code>addFile</code>.</p>
<p>They are moved to the <code>inflight</code> Set when they start loading, and assuming a successful
load, to the <code>queue</code> Set for further processing.</p>
<p>By the end of the load process this Set will be empty.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L233">Line 233</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="maxParallelDownloads">
    <h4 id="maxParallelDownloads"><span class="type-signature"></span>maxParallelDownloads<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The number of concurrent / parallel resources to try and fetch at once.</p>
<p>Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all.</p>
<p>The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L172">Line 172</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="path">
    <h4 id="path"><span class="type-signature"></span>path<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The value of <code>path</code>, if set, is placed before any <em>relative</em> file path given. For example:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.path = &quot;images/sprites/&quot;;
this.load.image(&quot;ball&quot;, &quot;ball.png&quot;);
this.load.image(&quot;tree&quot;, &quot;level1/oaktree.png&quot;);
this.load.image(&quot;boom&quot;, &quot;http://server.com/explode.png&quot;);
</code></pre>
<p>Would load the <code>ball</code> file from <code>images/sprites/ball.png</code> and the tree from
<code>images/sprites/level1/oaktree.png</code> but the file <code>boom</code> would load from the URL
given as it's an absolute URL.</p>
<p>Please note that the path is added before the filename but <em>after</em> the baseURL (if set.)</p>
<p>If you set this property directly then it <em>must</em> end with a &quot;/&quot;. Alternatively, call <code>setPath()</code> and it'll do it for you.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>''</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L127">Line 127</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="prefix">
    <h4 id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>An optional prefix that is automatically prepended to the start of every file key.
If prefix was <code>MENU.</code> and you load an image with the key 'Background' the resulting key would be <code>MENU.Background</code>.
You can set this directly, or call <code>Loader.setPrefix()</code>. It will then affect every file added to the Loader
from that point on. It does <em>not</em> change any file already in the load queue.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>''</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L114">Line 114</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="progress">
    <h4 id="progress"><span class="type-signature"></span>progress<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The progress of the current load queue, as a float value between 0 and 1.
This is updated automatically as files complete loading.
Note that it is possible for this value to go down again if you add content to the current load queue during a load.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>0</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L221">Line 221</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="queue">
    <h4 id="queue"><span class="type-signature"></span>queue<span class="type-signature"> :<a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>Files are stored in this Set while they're being processed.</p>
<p>If the process is successful they are moved to their final destination, which could be
a Cache or the Texture Manager.</p>
<p>At the end of the load process this Set will be empty.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Structs.Set.html">Phaser.Structs.Set</a>.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L260">Line 260</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="scene">
    <h4 id="scene"><span class="type-signature"></span>scene<span class="type-signature"> :<a href="Phaser.Scene.html">Phaser.Scene</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The Scene which owns this Loader instance.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Scene.html">Phaser.Scene</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L65">Line 65</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="sceneManager">
    <h4 id="sceneManager"><span class="type-signature">&lt;protected> </span>sceneManager<span class="type-signature"> :<a href="Phaser.Scenes.SceneManager.html">Phaser.Scenes.SceneManager</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>A reference to the global Scene Manager.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Scenes.SceneManager.html">Phaser.Scenes.SceneManager</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.16.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L101">Line 101</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="state">
    <h4 id="state"><span class="type-signature">&lt;readonly> </span>state<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The current state of the Loader.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L307">Line 307</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="systems">
    <h4 id="systems"><span class="type-signature"></span>systems<span class="type-signature"> :<a href="Phaser.Scenes.Systems.html">Phaser.Scenes.Systems</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>A reference to the Scene Systems.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Scenes.Systems.html">Phaser.Scenes.Systems</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L74">Line 74</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="textureManager">
    <h4 id="textureManager"><span class="type-signature"></span>textureManager<span class="type-signature"> :<a href="Phaser.Textures.TextureManager.html">Phaser.Textures.TextureManager</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>A reference to the global Texture Manager.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Textures.TextureManager.html">Phaser.Textures.TextureManager</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L92">Line 92</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="totalComplete">
    <h4 id="totalComplete"><span class="type-signature"></span>totalComplete<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The total number of files that successfully loaded during the most recent load.
This value is reset when you call <code>Loader.start</code>.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>0</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L296">Line 296</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="totalFailed">
    <h4 id="totalFailed"><span class="type-signature"></span>totalFailed<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The total number of files that failed to load during the most recent load.
This value is reset when you call <code>Loader.start</code>.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>0</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L285">Line 285</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="totalToLoad">
    <h4 id="totalToLoad"><span class="type-signature"></span>totalToLoad<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>The total number of files to load. It may not always be accurate because you may add to the Loader during the process
of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>0</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L210">Line 210</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        
            
<hr>
<dt class="name" id="xhr">
    <h4 id="xhr"><span class="type-signature"></span>xhr<span class="type-signature"> :<a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span></h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>xhr specific global settings (can be overridden on a per-file basis)</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L185">Line 185</a>)</dt>
	

	

	

	
</dl>


    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<hr>
<dt>
    <h4 class="name" id="addFile"><span class="type-signature"></span>addFile(file)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a file, or array of files, into the load queue.</p>
<p>The file must be an instance of <code>Phaser.Loader.File</code>, or a class that extends it. The Loader will check that the key
used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.
If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already
started, ready for the next batch of files to be pulled from the list to the inflight queue.</p>
<p>You should not normally call this method directly, but rather use one of the Loader methods like <code>image</code> or <code>atlas</code>,
however you can call this as long as the file given to it is well formed.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Loader.File.html">Phaser.Loader.File</a>></span>



            
            </td>

            

            

            <td class="description last"><p>The file, or array of files, to be added to the load queue.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L475">Line 475</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li><a href="Phaser.Loader.Events.html#event:ADD">Phaser.Loader.Events#event:ADD</a></li>
    </ul>
    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addListener"><span class="type-signature"></span>addListener(event, fn [, context])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Add a listener for a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The listener function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    this
                
                </td>
            

            <td class="description last"><p>The context to invoke the listener with.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#addListener">Phaser.Events.EventEmitter#addListener</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L111">Line 111</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addPack"><span class="type-signature"></span>addPack(pack [, packKey])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call
this method directly, but instead use <code>Loader.pack</code> and supply a path to a JSON file that holds the
pack data. However, if you've got the data prepared you can pass it to this method.</p>
<p>You can also provide an optional key. If you do then it will only add the entries from that part of the pack into
to the load queue. If not specified it will add all entries it finds. For more details about the pack file format
see the <code>LoaderPlugin.pack</code> method.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>pack</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The Pack File data to be parsed and each entry of it to added to the load queue.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>packKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An optional key to use from the pack file data.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L577">Line 577</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>true</code> if any files were added to the queue, otherwise <code>false</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="animation"><span class="type-signature"></span>animation(key [, url] [, dataKey] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.animation('baddieAnims', 'files/BaddieAnims.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.animation({
    key: 'baddieAnims',
    url: 'files/BaddieAnims.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.JSONFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will automatically be passed to the global Animation Managers <code>fromJSON</code> method.
This will parse all of the JSON data and create animation data from it. This process happens at the very end
of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load
both animation data and the images it relies upon in the same load call.</p>
<p>Once the animation data has been parsed you will be able to play animations using that data.
Please see the Animation Manager <code>fromJSON</code> method for more details about the format and playback.</p>
<p>You can also access the raw animation data from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.animation('baddieAnims', 'files/BaddieAnims.json');
// and later in your game ...
var data = this.cache.json.get('baddieAnims');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Waves</code> the final key will be <code>LEVEL1.Waves</code> and
this is what you would use to retrieve the text from the JSON Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;data&quot;
and no URL is given then the Loader will set the URL to be &quot;data.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>You can also optionally provide a <code>dataKey</code> to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:</p>
<pre class="prettyprint source lang-json"><code>{
    &quot;level1&quot;: {
        &quot;baddies&quot;: {
            &quot;aliens&quot;: {},
            &quot;boss&quot;: {}
        }
    },
    &quot;level2&quot;: {},
    &quot;level3&quot;: {}
}
</code></pre>
<p>And if you only wanted to create animations from the <code>boss</code> data, then you could pass <code>level1.baddies.boss</code>as the <code>dataKey</code>.</p>
<p>Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AnimationJSONFile.js">src/loader/filetypes/AnimationJSONFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AnimationJSONFile.js#L77">Line 77</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="aseprite"><span class="type-signature"></span>aseprite(key [, textureURL] [, atlasURL] [, textureXhrSettings] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Aseprite is a powerful animated sprite editor and pixel art tool.</p>
<p>You can find more details at https://www.aseprite.org/</p>
<p>Adds a JSON based Aseprite Animation, or array of animations, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.aseprite('gladiator', 'images/Gladiator.png', 'images/Gladiator.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>To export a compatible JSON file in Aseprite, please do the following:</p>
<ol>
<li>
<p>Go to &quot;File - Export Sprite Sheet&quot;</p>
</li>
<li>
<p>On the <strong>Layout</strong> tab:
2a. Set the &quot;Sheet type&quot; to &quot;Packed&quot;
2b. Set the &quot;Constraints&quot; to &quot;None&quot;
2c. Check the &quot;Merge Duplicates&quot; checkbox</p>
</li>
<li>
<p>On the <strong>Sprite</strong> tab:
3a. Set &quot;Layers&quot; to &quot;Visible layers&quot;
3b. Set &quot;Frames&quot; to &quot;All frames&quot;, unless you only wish to export a sub-set of tags</p>
</li>
<li>
<p>On the <strong>Borders</strong> tab:
4a. Check the &quot;Trim Sprite&quot; and &quot;Trim Cells&quot; options
4b. Ensure &quot;Border Padding&quot;, &quot;Spacing&quot; and &quot;Inner Padding&quot; are all &gt; 0 (1 is usually enough)</p>
</li>
<li>
<p>On the <strong>Output</strong> tab:
5a. Check &quot;Output File&quot;, give your image a name and make sure you choose &quot;png files&quot; as the file type
5b. Check &quot;JSON Data&quot; and give your json file a name
5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
5d. Make sure &quot;Tags&quot; is checked in the Meta options
5e. In the &quot;Item Filename&quot; input box, make sure it says just &quot;{frame}&quot; and nothing more.</p>
</li>
<li>
<p>Click export</p>
</li>
</ol>
<p>This was tested with Aseprite 1.2.25.</p>
<p>This will export a png and json file which you can load using the Aseprite Loader, i.e.:</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.aseprite({
    key: 'gladiator',
    textureURL: 'images/Gladiator.png',
    atlasURL: 'images/Gladiator.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.AsepriteFileConfig</code> for more details.</p>
<p>Instead of passing a URL for the JSON data you can also pass in a well formed JSON object instead.</p>
<p>Once loaded, you can call this method from within a Scene with the 'atlas' key:</p>
<pre class="prettyprint source lang-javascript"><code>this.anims.createFromAseprite('paladin');
</code></pre>
<p>Any animations defined in the JSON will now be available to use in Phaser and you play them
via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline,
you can play it in Phaser using that Tag name:</p>
<pre class="prettyprint source lang-javascript"><code>this.add.sprite(400, 300).play('War Cry');
</code></pre>
<p>When calling this method you can optionally provide an array of tag names, and only those animations
will be created. For example:</p>
<pre class="prettyprint source lang-javascript"><code>this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]);
</code></pre>
<p>This will only create the 3 animations defined. Note that the tag names are case-sensitive.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Aseprite File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.AsepriteFileConfig">Phaser.Types.Loader.FileTypes.AsepriteFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.AsepriteFileConfig">Phaser.Types.Loader.FileTypes.AsepriteFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture image file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture atlas json data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;. Or, a well formed JSON object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.50.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AsepriteFile.js">src/loader/filetypes/AsepriteFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AsepriteFile.js#L111">Line 111</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="atlas"><span class="type-signature"></span>atlas(key [, textureURL] [, atlasURL] [, textureXhrSettings] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.
These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate.
If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader
instead of this one.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig</code> for more details.</p>
<p>Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.</p>
<p>Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
</code></pre>
<p>To get a list of all available frames within an atlas please consult your Texture Atlas software.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.json'
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.AtlasJSONFileConfig">Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.AtlasJSONFileConfig">Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture image file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture atlas json data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;. Or, a well formed JSON object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AtlasJSONFile.js">src/loader/filetypes/AtlasJSONFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AtlasJSONFile.js#L109">Line 109</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="atlasXML"><span class="type-signature"></span>atlasXML(key [, textureURL] [, atlasURL] [, textureXhrSettings] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an XML based Texture Atlas, or array of atlases, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the atlas data to be provided in an XML file format.
These files are created by software such as Shoebox and Adobe Flash / Animate.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlasXML({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.xml'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig</code> for more details.</p>
<p>Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
</code></pre>
<p>To get a list of all available frames within an atlas please consult your Texture Atlas software.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.atlasXML({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.xml'
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.AtlasXMLFileConfig">Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.AtlasXMLFileConfig">Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture image file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture atlas xml data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AtlasXMLFile.js">src/loader/filetypes/AtlasXMLFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AtlasXMLFile.js#L107">Line 107</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="audio"><span class="type-signature"></span>audio(key [, urls] [, config] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Audio Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.audio({
    key: 'title',
    url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.AudioFileConfig</code> for more details.</p>
<p>The URLs can be relative or absolute. If the URLs are relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to them.</p>
<p>Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which <em>one</em> file to load based on
browser support.</p>
<p>If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.</p>
<p>Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.AudioFileConfig">Phaser.Types.Loader.FileTypes.AudioFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.AudioFileConfig">Phaser.Types.Loader.FileTypes.AudioFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the audio files from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>config</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An object containing an <code>instances</code> property for HTML5Audio. Defaults to 1.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AudioFile.js">src/loader/filetypes/AudioFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AudioFile.js#L170">Line 170</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="audioSprite"><span class="type-signature"></span>audioSprite(key, jsonURL [, audioURL] [, audioConfig] [, audioXhrSettings] [, jsonXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.audioSprite('kyobi', 'kyobi.json', [
        'kyobi.ogg',
        'kyobi.mp3',
        'kyobi.m4a'
    ]);
}
</code></pre>
<p>Audio Sprites are a combination of audio files and a JSON configuration.
The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite</p>
<p>If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio
files automatically based on its content. To do this exclude the audio URLs from the load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.audioSprite('kyobi', 'kyobi.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Audio Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.audioSprite({
    key: 'kyobi',
    jsonURL: 'audio/Kyobi.json',
    audioURL: [
        'audio/Kyobi.ogg',
        'audio/Kyobi.mp3',
        'audio/Kyobi.m4a'
    ]
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig</code> for more details.</p>
<p>Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.</p>
<p>Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.audioSprite('kyobi', 'kyobi.json');
// and later in your game ...
var music = this.sound.addAudioSprite('kyobi');
music.play('title');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which <em>one</em> file to load based on
browser support.</p>
<p>If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.</p>
<p>Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.AudioSpriteFileConfig">Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.AudioSpriteFileConfig">Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or an array of objects.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>audioURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>audioConfig</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The audio configuration options.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>audioXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AudioSpriteFile.js">src/loader/filetypes/AudioSpriteFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/AudioSpriteFile.js#L143">Line 143</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="binary"><span class="type-signature"></span>binary(key [, url] [, dataType] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Binary file, or array of Binary files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.binary('doom', 'files/Doom.wad');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Binary Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Binary Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.binary({
    key: 'doom',
    url: 'files/Doom.wad',
    dataType: Uint8Array
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.BinaryFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.binary('doom', 'files/Doom.wad');
// and later in your game ...
var data = this.cache.binary.get('doom');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Data</code> the final key will be <code>LEVEL1.Data</code> and
this is what you would use to retrieve the text from the Binary Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;doom&quot;
and no URL is given then the Loader will set the URL to be &quot;doom.bin&quot;. It will always add <code>.bin</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.BinaryFileConfig">Phaser.Types.Loader.FileTypes.BinaryFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.BinaryFileConfig">Phaser.Types.Loader.FileTypes.BinaryFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.bin</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.bin&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataType</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Optional type to cast the binary file to once loaded. For example, <code>Uint8Array</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/BinaryFile.js">src/loader/filetypes/BinaryFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/BinaryFile.js#L89">Line 89</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="bitmapFont"><span class="type-signature"></span>bitmapFont(key [, textureURL] [, fontDataURL] [, textureXhrSettings] [, fontDataXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an XML based Bitmap Font, or array of fonts, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the font data to be provided in an XML file format.
These files are created by software such as the <a href="http://www.angelcode.com/products/bmfont/">Angelcode Bitmap Font Generator</a>,
<a href="http://kvazars.com/littera/">Littera</a> or <a href="https://71squared.com/glyphdesigner">Glyph Designer</a></p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.bitmapFont({
    key: 'goldenFont',
    textureURL: 'images/GoldFont.png',
    fontDataURL: 'images/GoldFont.xml'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.BitmapFontFileConfig</code> for more details.</p>
<p>Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
// and later in your game ...
this.add.bitmapText(x, y, 'goldenFont', 'Hello World');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use when creating a Bitmap Text object.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.bitmapFont({
    key: 'goldenFont',
    textureURL: 'images/GoldFont.png',
    normalMap: 'images/GoldFont-n.png',
    fontDataURL: 'images/GoldFont.xml'
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.BitmapFontFileConfig">Phaser.Types.Loader.FileTypes.BitmapFontFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.BitmapFontFileConfig">Phaser.Types.Loader.FileTypes.BitmapFontFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the font image file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fontDataURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the font xml data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fontDataXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/BitmapFontFile.js">src/loader/filetypes/BitmapFontFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/BitmapFontFile.js#L113">Line 113</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="css"><span class="type-signature"></span>css(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a CSS file, or array of CSS files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.css('headers', 'styles/headers.css');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String and not already in-use by another file in the Loader.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.css({
    key: 'headers',
    url: 'styles/headers.css'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.CSSFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will automatically be converted into a style DOM element
via <code>document.createElement('style')</code>. It will have its <code>defer</code> property set to false and then the
resulting element will be appended to <code>document.head</code>. The CSS styles are then applied to the current document.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.css&quot;. It will always add <code>.css</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.CSSFileConfig">Phaser.Types.Loader.FileTypes.CSSFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.CSSFileConfig">Phaser.Types.Loader.FileTypes.CSSFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.css</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.css&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.17.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/CSSFile.js">src/loader/filetypes/CSSFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/CSSFile.js#L88">Line 88</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="emit"><span class="type-signature"></span>emit(event [, args])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Calls each of the listeners registered for a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>args</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                    &lt;repeatable><br>
                
                </td>
            

            

            <td class="description last"><p>Additional arguments that will be passed to the event handler.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#emit">Phaser.Events.EventEmitter#emit</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L86">Line 86</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>true</code> if the event had listeners, else <code>false</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="eventNames"><span class="type-signature"></span>eventNames()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Return an array listing the events for which the emitter has registered listeners.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#eventNames">Phaser.Events.EventEmitter#eventNames</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L55">Line 55</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;(string|symbol)></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="fileProcessComplete"><span class="type-signature"></span>fileProcessComplete(file)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>An internal method that is called automatically by the File when it has finished processing.</p>
<p>If the process was successful, and the File isn't part of a MultiFile, its <code>addToCache</code> method is called.</p>
<p>It this then removed from the queue. If there are no more files to load <code>loadComplete</code> is called.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></span>



            
            </td>

            

            

            <td class="description last"><p>The file that has finished processing.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L847">Line 847</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="flagForRemoval"><span class="type-signature"></span>flagForRemoval(file)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a File into the pending-deletion queue.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></span>



            
            </td>

            

            

            <td class="description last"><p>The File to be queued for deletion when the Loader completes.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L936">Line 936</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="glsl"><span class="type-signature"></span>glsl(key [, url] [, shaderType] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a GLSL file, or array of GLSL files, to the current load queue.
In Phaser 3 GLSL files are just plain Text files at the current moment in time.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.glsl('plasma', 'shaders/Plasma.glsl');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Shader Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Shader Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.glsl({
    key: 'plasma',
    shaderType: 'fragment',
    url: 'shaders/Plasma.glsl'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.GLSLFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.glsl('plasma', 'shaders/Plasma.glsl');
// and later in your game ...
var data = this.cache.shader.get('plasma');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>FX.</code> and the key was <code>Plasma</code> the final key will be <code>FX.Plasma</code> and
this is what you would use to retrieve the text from the Shader Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;plasma&quot;
and no URL is given then the Loader will set the URL to be &quot;plasma.glsl&quot;. It will always add <code>.glsl</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.GLSLFileConfig">Phaser.Types.Loader.FileTypes.GLSLFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.GLSLFileConfig">Phaser.Types.Loader.FileTypes.GLSLFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.glsl</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.glsl&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>shaderType</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'fragment'
                
                </td>
            

            <td class="description last"><p>The type of shader. Either <code>fragment</code> for a fragment shader, or <code>vertex</code> for a vertex shader. This is ignored if you load a shader bundle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/GLSLFile.js">src/loader/filetypes/GLSLFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/GLSLFile.js#L317">Line 317</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="html"><span class="type-signature"></span>html(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an HTML file, or array of HTML files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.html('story', 'files/LoginForm.html');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the HTML Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the HTML Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.html({
    key: 'login',
    url: 'files/LoginForm.html'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.HTMLFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.html('login', 'files/LoginForm.html');
// and later in your game ...
var data = this.cache.html.get('login');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the html from the HTML Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;story&quot;
and no URL is given then the Loader will set the URL to be &quot;story.html&quot;. It will always add <code>.html</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.HTMLFileConfig">Phaser.Types.Loader.FileTypes.HTMLFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.HTMLFileConfig">Phaser.Types.Loader.FileTypes.HTMLFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.html</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.html&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.12.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/HTMLFile.js">src/loader/filetypes/HTMLFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/HTMLFile.js#L84">Line 84</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="htmlTexture"><span class="type-signature"></span>htmlTexture(key [, url] [, width] [, height] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they
will be rendered to textures and stored in the Texture Manager.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.htmlTexture({
    key: 'instructions',
    url: 'content/intro.html',
    width: 256,
    height: 512
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
// and later in your game ...
this.add.image(x, y, 'instructions');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.html&quot;. It will always add <code>.html</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these
automatically, so you will need to provide them, either as arguments or in the file config object.
When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.
The SVG file has a body tag added to it, with the HTML file contents included. It then calls <code>window.Blob</code> on the SVG,
and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered
HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are
limitations on what HTML can be inside an SVG. You can find out more details in this
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas">Mozilla MDN entry</a>.</p>
<p>Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.HTMLTextureFileConfig">Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.HTMLTextureFileConfig">Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.html</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.html&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    512
                
                </td>
            

            <td class="description last"><p>The width of the texture the HTML will be rendered to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    512
                
                </td>
            

            <td class="description last"><p>The height of the texture the HTML will be rendered to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.12.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/HTMLTextureFile.js">src/loader/filetypes/HTMLTextureFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/HTMLTextureFile.js#L153">Line 153</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="image"><span class="type-signature"></span>image(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an Image, or array of Images, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.image('logo', 'images/phaserLogo.png');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
of animated gifs to Canvas elements.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.image({
    key: 'logo',
    url: 'images/AtariLogo.png'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.ImageFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.image('logo', 'images/AtariLogo.png');
// and later in your game ...
this.add.image(x, y, 'logo');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.image({
    key: 'logo',
    url: 'images/AtariLogo.png',
    normalMap: 'images/AtariLogo-n.png'
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.ImageFileConfig">Phaser.Types.Loader.FileTypes.ImageFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.ImageFileConfig">Phaser.Types.Loader.FileTypes.ImageFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ImageFile.js">src/loader/filetypes/ImageFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ImageFile.js#L159">Line 159</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="isLoading"><span class="type-signature"></span>isLoading()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Is the Loader actively loading, or processing loaded files?</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L654">Line 654</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>true</code> if the Loader is busy loading or processing, otherwise <code>false</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="isReady"><span class="type-signature"></span>isReady()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Is the Loader ready to start a new load?</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L667">Line 667</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>true</code> if the Loader is ready to start a new load, otherwise <code>false</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="json"><span class="type-signature"></span>json(key [, url] [, dataKey] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a JSON file, or array of JSON files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.json('wavedata', 'files/AlienWaveData.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.json({
    key: 'wavedata',
    url: 'files/AlienWaveData.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.JSONFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.json('wavedata', 'files/AlienWaveData.json');
// and later in your game ...
var data = this.cache.json.get('wavedata');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Waves</code> the final key will be <code>LEVEL1.Waves</code> and
this is what you would use to retrieve the text from the JSON Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;data&quot;
and no URL is given then the Loader will set the URL to be &quot;data.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>You can also optionally provide a <code>dataKey</code> to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:</p>
<pre class="prettyprint source lang-json"><code>{
    &quot;level1&quot;: {
        &quot;baddies&quot;: {
            &quot;aliens&quot;: {},
            &quot;boss&quot;: {}
        }
    },
    &quot;level2&quot;: {},
    &quot;level3&quot;: {}
}
</code></pre>
<p>And you only wanted to store the <code>boss</code> data in the Cache, then you could pass <code>level1.baddies.boss</code>as the <code>dataKey</code>.</p>
<p>Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;. Or, can be a fully formed JSON Object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>When the JSON file loads only this property will be stored in the Cache.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/JSONFile.js">src/loader/filetypes/JSONFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/JSONFile.js#L120">Line 120</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="keyExists"><span class="type-signature"></span>keyExists(file)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Checks the key and type of the given file to see if it will conflict with anything already
in a Cache, the Texture Manager, or the list or inflight queues.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></span>



            
            </td>

            

            

            <td class="description last"><p>The file to check the key of.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L520">Line 520</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>true</code> if adding this file will cause a cache or queue conflict, otherwise <code>false</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="listenerCount"><span class="type-signature"></span>listenerCount(event)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Return the number of listeners listening to a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#listenerCount">Phaser.Events.EventEmitter#listenerCount</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L75">Line 75</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The number of listeners.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="listeners"><span class="type-signature"></span>listeners(event)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Return the listeners registered for a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#listeners">Phaser.Events.EventEmitter#listeners</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L64">Line 64</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The registered listeners.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;function()></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="loadComplete"><span class="type-signature"></span>loadComplete()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Called at the end when the load queue is exhausted and all files have either loaded or errored.
By this point every loaded file will now be in its associated cache and ready for use.</p>
<p>Also clears down the Sets, puts progress to 1 and clears the deletion queue.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L903">Line 903</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li><a href="Phaser.Loader.Events.html#event:COMPLETE">Phaser.Loader.Events#event:COMPLETE</a></li>
    
        <li><a href="Phaser.Loader.Events.html#event:POST_PROCESS">Phaser.Loader.Events#event:POST_PROCESS</a></li>
    </ul>
    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="multiatlas"><span class="type-signature"></span>multiatlas(key [, atlasURL] [, path] [, baseURL] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.multiatlas('level1', 'images/Level1.json');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,
version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.</p>
<p>The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and
extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,
Phaser will load those as well.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.multiatlas({
    key: 'level1',
    atlasURL: 'images/Level1.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig</code> for more details.</p>
<p>Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.</p>
<p>Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.multiatlas('level1', 'images/Level1.json');
// and later in your game ...
this.add.image(x, y, 'level1', 'background');
</code></pre>
<p>To get a list of all available frames within an atlas please consult your Texture Atlas software.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.MultiAtlasFileConfig">Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.MultiAtlasFileConfig">Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture atlas json data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>path</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Optional path to use when loading the textures defined in the atlas data.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>baseURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Optional Base URL to use when loading the textures defined in the atlas data.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/MultiAtlasFile.js">src/loader/filetypes/MultiAtlasFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/MultiAtlasFile.js#L217">Line 217</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="nextFile"><span class="type-signature"></span>nextFile(file, success)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>An internal method called automatically by the XHRLoader belong to a File.</p>
<p>This method will remove the given file from the inflight Set and update the load progress.
If the file was successful its <code>onProcess</code> method is called, otherwise it is added to the delete queue.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Loader.File.html">Phaser.Loader.File</a></span>



            
            </td>

            

            

            <td class="description last"><p>The File that just finished loading, or errored during load.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>success</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            

            

            <td class="description last"><p><code>true</code> if the file loaded successfully, otherwise <code>false</code>.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L799">Line 799</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li><a href="Phaser.Loader.Events.html#event:FILE_LOAD">Phaser.Loader.Events#event:FILE_LOAD</a></li>
    
        <li><a href="Phaser.Loader.Events.html#event:FILE_LOAD_ERROR">Phaser.Loader.Events#event:FILE_LOAD_ERROR</a></li>
    </ul>
    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="obj"><span class="type-signature"></span>obj(key [, objURL] [, matURL] [, flipUV] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Wavefront OBJ file, or array of OBJ files, to the current load queue.</p>
<p>Note: You should ensure your 3D package has triangulated the OBJ file prior to export.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.obj('ufo', 'files/spaceship.obj');
}
</code></pre>
<p>You can optionally also load a Wavefront Material file as well, by providing the 3rd parameter:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.obj('ufo', 'files/spaceship.obj', 'files/spaceship.mtl');
}
</code></pre>
<p>If given, the material will be parsed and stored along with the obj data in the cache.</p>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global OBJ Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the OBJ Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the OBJ Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.obj({
    key: 'ufo',
    url: 'files/spaceship.obj',
    matURL: 'files/spaceship.mtl',
    flipUV: true
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.OBJFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.obj('ufo', 'files/spaceship.obj');
// and later in your game ...
var data = this.cache.obj.get('ufo');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the obj from the OBJ Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;story&quot;
and no URL is given then the Loader will set the URL to be &quot;story.obj&quot;. It will always add <code>.obj</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the OBJ File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.OBJFileConfig">Phaser.Types.Loader.FileTypes.OBJFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.OBJFileConfig">Phaser.Types.Loader.FileTypes.OBJFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>objURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the obj file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.obj</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.obj&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>matURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Optional absolute or relative URL to load the obj material file from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>flipUV</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Flip the UV coordinates stored in the model data?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.50.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/OBJFile.js">src/loader/filetypes/OBJFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/OBJFile.js#L140">Line 140</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="off"><span class="type-signature"></span>off(event [, fn] [, context] [, once])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Remove the listeners of a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove the listeners that match this function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove the listeners that have this context.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>once</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove one-time listeners.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#off">Phaser.Events.EventEmitter#off</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L151">Line 151</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="on"><span class="type-signature"></span>on(event, fn [, context])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Add a listener for a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The listener function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    this
                
                </td>
            

            <td class="description last"><p>The context to invoke the listener with.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#on">Phaser.Events.EventEmitter#on</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L98">Line 98</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="once"><span class="type-signature"></span>once(event, fn [, context])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Add a one-time listener for a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The listener function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    this
                
                </td>
            

            <td class="description last"><p>The context to invoke the listener with.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#once">Phaser.Events.EventEmitter#once</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L124">Line 124</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="pack"><span class="type-signature"></span>pack(key [, url] [, dataKey] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a JSON File Pack, or array of packs, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.pack('level1', 'data/Level1Files.json');
}
</code></pre>
<p>A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.
Here is a small example:</p>
<pre class="prettyprint source lang-json"><code>{
   &quot;test1&quot;: {
       &quot;files&quot;: [
           {
               &quot;type&quot;: &quot;image&quot;,
               &quot;key&quot;: &quot;taikodrummaster&quot;,
               &quot;url&quot;: &quot;assets/pics/taikodrummaster.jpg&quot;
           },
           {
               &quot;type&quot;: &quot;image&quot;,
               &quot;key&quot;: &quot;sukasuka-chtholly&quot;,
               &quot;url&quot;: &quot;assets/pics/sukasuka-chtholly.png&quot;
           }
       ]
   },
   &quot;meta&quot;: {
       &quot;generated&quot;: &quot;1401380327373&quot;,
       &quot;app&quot;: &quot;Phaser 3 Asset Packer&quot;,
       &quot;url&quot;: &quot;https://phaser.io&quot;,
       &quot;version&quot;: &quot;1.0&quot;,
       &quot;copyright&quot;: &quot;Photon Storm Ltd. 2018&quot;
   }
}
</code></pre>
<p>The pack can be split into sections. In the example above you'll see a section called <code>test1. You can tell the </code>load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,
so you can pass it to the Loader to process additional sections as needed in your game, or you can just load
them all at once without specifying anything.</p>
<p>The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly
match that of the file type configs, and all properties available within the file type configs can be used
in the pack file too.</p>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.pack({
    key: 'level1',
    url: 'data/Level1Files.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.PackFileConfig</code> for more details.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Waves</code> the final key will be <code>LEVEL1.Waves</code> and
this is what you would use to retrieve the text from the JSON Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;data&quot;
and no URL is given then the Loader will set the URL to be &quot;data.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>You can also optionally provide a <code>dataKey</code> to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:</p>
<pre class="prettyprint source lang-json"><code>{
    &quot;level1&quot;: {
        &quot;baddies&quot;: {
            &quot;aliens&quot;: {},
            &quot;boss&quot;: {}
        }
    },
    &quot;level2&quot;: {},
    &quot;level3&quot;: {}
}
</code></pre>
<p>And you only wanted to store the <code>boss</code> data in the Cache, then you could pass <code>level1.baddies.boss</code>as the <code>dataKey</code>.</p>
<p>Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.PackFileConfig">Phaser.Types.Loader.FileTypes.PackFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.PackFileConfig">Phaser.Types.Loader.FileTypes.PackFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>When the JSON file loads only this property will be stored in the Cache.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/PackFile.js">src/loader/filetypes/PackFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/PackFile.js#L72">Line 72</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="plugin"><span class="type-signature"></span>plugin(key [, url] [, start] [, mapping] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Plugin Script file, or array of plugin files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.plugin('modplayer', 'plugins/ModPlayer.js');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String and not already in-use by another file in the Loader.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.plugin({
    key: 'modplayer',
    url: 'plugins/ModPlayer.js'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.PluginFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will automatically be converted into a script element
via <code>document.createElement('script')</code>. It will have its language set to JavaScript, <code>defer</code> set to
false and then the resulting element will be appended to <code>document.head</code>. Any code then in the
script will be executed. It will then be passed to the Phaser PluginCache.register method.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.js&quot;. It will always add <code>.js</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.PluginFileConfig">Phaser.Types.Loader.FileTypes.PluginFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.PluginFileConfig">Phaser.Types.Loader.FileTypes.PluginFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;. Or, a plugin function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Automatically start the plugin after loading?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mapping</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>If this plugin is to be injected into the Scene, this is the property key used.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/PluginFile.js">src/loader/filetypes/PluginFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/PluginFile.js#L129">Line 129</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeAllListeners"><span class="type-signature"></span>removeAllListeners( [event])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Remove all listeners, or those of the specified event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#removeAllListeners">Phaser.Events.EventEmitter#removeAllListeners</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L165">Line 165</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeListener"><span class="type-signature"></span>removeListener(event [, fn] [, context] [, once])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Remove the listeners of a given event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>event</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">symbol</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The event name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove the listeners that match this function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove the listeners that have this context.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>once</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Only remove one-time listeners.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	
	<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
	<dd class="inherited-from">
		<ul class="dummy">
			<li>
				<a href="Phaser.Events.EventEmitter.html#removeListener">Phaser.Events.EventEmitter#removeListener</a>
			</li>
		</ul>
	</dd>
	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js">src/events/EventEmitter.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/events/EventEmitter.js#L137">Line 137</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><code>this</code>.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="reset"><span class="type-signature"></span>reset()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Resets the Loader.</p>
<p>This will clear all lists and reset the base URL, path and prefix.</p>
<p>Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L1001">Line 1001</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="save"><span class="type-signature"></span>save(data [, filename] [, filetype])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Causes the browser to save the given data as a file to its default Downloads folder.</p>
<p>Creates a DOM level anchor link, assigns it as being a <code>download</code> anchor, sets the href
to be an ObjectURL based on the given data, and then invokes a click event.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The data to be saved. Will be passed through URL.createObjectURL.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>filename</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    file.json
                
                </td>
            

            <td class="description last"><p>The filename to save the file as.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>filetype</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    application/json
                
                </td>
            

            <td class="description last"><p>The file type to use when saving the file. Defaults to JSON.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L967">Line 967</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader plugin.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="saveJSON"><span class="type-signature"></span>saveJSON(data [, filename])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally.</p>
<p>The data must be well formed JSON and ready-parsed, not a JavaScript object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The JSON data, ready parsed.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>filename</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    file.json
                
                </td>
            

            <td class="description last"><p>The name to save the JSON file as.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L949">Line 949</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader plugin.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sceneFile"><span class="type-signature"></span>sceneFile(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an external Scene file, or array of Scene files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.sceneFile('Level1', 'src/Level1.js');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.</p>
<p>For a Scene File it's vitally important that the key matches the class name in the JavaScript file.</p>
<p>For example here is the source file:</p>
<pre class="prettyprint source lang-javascript"><code>class ExternalScene extends Phaser.Scene {

    constructor ()
    {
        super('myScene');
    }

}
</code></pre>
<p>Because the class is called <code>ExternalScene</code> that is the exact same key you must use when loading it:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.sceneFile('ExternalScene', 'src/yourScene.js');
}
</code></pre>
<p>The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene
constructor, as we've done in the example above, where the Scene key was changed to <code>myScene</code>.</p>
<p>The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Scene Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.sceneFile({
    key: 'Level1',
    url: 'src/Level1.js'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.SceneFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will be added to the Scene Manager.</p>
<pre class="prettyprint source lang-javascript"><code>this.load.sceneFile('Level1', 'src/Level1.js');
// and later in your game ...
this.scene.start('Level1');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>WORLD1.</code> and the key was <code>Story</code> the final key will be <code>WORLD1.Story</code> and
this is what you would use to retrieve the text from the Scene Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;story&quot;
and no URL is given then the Loader will set the URL to be &quot;story.js&quot;. It will always add <code>.js</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.SceneFileConfig">Phaser.Types.Loader.FileTypes.SceneFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.SceneFileConfig">Phaser.Types.Loader.FileTypes.SceneFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.16.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SceneFile.js">src/loader/filetypes/SceneFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SceneFile.js#L101">Line 101</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="scenePlugin"><span class="type-signature"></span>scenePlugin(key [, url] [, systemKey] [, sceneKey] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String and not already in-use by another file in the Loader.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.scenePlugin({
    key: 'modplayer',
    url: 'plugins/ModPlayer.js'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.ScenePluginFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will automatically be converted into a script element
via <code>document.createElement('script')</code>. It will have its language set to JavaScript, <code>defer</code> set to
false and then the resulting element will be appended to <code>document.head</code>. Any code then in the
script will be executed. It will then be passed to the Phaser PluginCache.register method.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.js&quot;. It will always add <code>.js</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.ScenePluginFileConfig">Phaser.Types.Loader.FileTypes.ScenePluginFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.ScenePluginFileConfig">Phaser.Types.Loader.FileTypes.ScenePluginFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;. Or, set to a plugin function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>systemKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>If this plugin is to be added to Scene.Systems, this is the property key for it.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sceneKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>If this plugin is to be added to the Scene, this is the property key for it.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.8.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ScenePluginFile.js">src/loader/filetypes/ScenePluginFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ScenePluginFile.js#L123">Line 123</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="script"><span class="type-signature"></span>script(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Script file, or array of Script files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.script('aliens', 'lib/aliens.js');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String and not already in-use by another file in the Loader.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.script({
    key: 'aliens',
    url: 'lib/aliens.js'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.ScriptFileConfig</code> for more details.</p>
<p>Once the file has finished loading it will automatically be converted into a script element
via <code>document.createElement('script')</code>. It will have its language set to JavaScript, <code>defer</code> set to
false and then the resulting element will be appended to <code>document.head</code>. Any code then in the
script will be executed.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.js&quot;. It will always add <code>.js</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.ScriptFileConfig">Phaser.Types.Loader.FileTypes.ScriptFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.ScriptFileConfig">Phaser.Types.Loader.FileTypes.ScriptFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.js</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.js&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ScriptFile.js">src/loader/filetypes/ScriptFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/ScriptFile.js#L90">Line 90</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="scripts"><span class="type-signature"></span>scripts(key [, url] [, extension] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an array of Script files to the current load queue.</p>
<p>The difference between this and the <code>ScriptFile</code> file type is that you give an array of scripts to this method,
and the scripts are then processed <em>exactly</em> in that order. This allows you to load a bunch of scripts that
may have dependencies on each other without worrying about the async nature of traditional script loading.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.scripts('PostProcess', [
        'libs/shaders/CopyShader.js',
        'libs/postprocessing/EffectComposer.js',
        'libs/postprocessing/RenderPass.js',
        'libs/postprocessing/MaskPass.js',
        'libs/postprocessing/ShaderPass.js',
        'libs/postprocessing/AfterimagePass.js'
   ]);
}
</code></pre>
<p>In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact
order given in the array.</p>
<p>The files are <strong>not</strong> loaded right away. They are added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the files are queued
it means you cannot use the files immediately after calling this method, but must wait for the files to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String and not already in-use by another file in the Loader.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.scripts({
    key: 'PostProcess',
    url: [
        'libs/shaders/CopyShader.js',
        'libs/postprocessing/EffectComposer.js',
        'libs/postprocessing/RenderPass.js',
        'libs/postprocessing/MaskPass.js',
        'libs/postprocessing/ShaderPass.js',
        'libs/postprocessing/AfterimagePass.js'
       ]
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.MultiScriptFileConfig</code> for more details.</p>
<p>Once all the files have finished loading they will automatically be converted into a script element
via <code>document.createElement('script')</code>. They will have their language set to JavaScript, <code>defer</code> set to
false and then the resulting element will be appended to <code>document.head</code>. Any code then in the
script will be executed. This is done in the exact order the files are specified in the url array.</p>
<p>The URLs can be relative or absolute. If the URLs are relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to them.</p>
<p>Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.MultiScriptFileConfig">Phaser.Types.Loader.FileTypes.MultiScriptFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.MultiScriptFileConfig">Phaser.Types.Loader.FileTypes.MultiScriptFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>extension</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'js'
                
                </td>
            

            <td class="description last"><p>The default file extension to use if no url is provided.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Extra XHR Settings specifically for these files.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.17.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/MultiScriptFile.js">src/loader/filetypes/MultiScriptFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/MultiScriptFile.js#L109">Line 109</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setBaseURL"><span class="type-signature"></span>setBaseURL( [url])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>If you want to append a URL before the path of any asset you can set this here.</p>
<p>Useful if allowing the asset base url to be configured outside of the game code.</p>
<p>Once a base URL is set it will affect every file loaded by the Loader from that point on. It does <em>not</em> change any
file <em>already</em> being loaded. To reset it, call this method with no arguments.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The URL to use. Leave empty to reset.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L358">Line 358</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setCORS"><span class="type-signature"></span>setCORS( [crossOrigin])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Sets the Cross Origin Resource Sharing value used when loading files.</p>
<p>Files can override this value on a per-file basis by specifying an alternative <code>crossOrigin</code> value in their file config.</p>
<p>Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have
their own CORs setting. To reset it, call this method with no arguments.</p>
<p>For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>crossOrigin</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The value to use for the <code>crossOrigin</code> property in the load request.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L451">Line 451</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setPath"><span class="type-signature"></span>setPath( [path])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>The value of <code>path</code>, if set, is placed before any <em>relative</em> file path given. For example:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.setPath(&quot;images/sprites/&quot;);
this.load.image(&quot;ball&quot;, &quot;ball.png&quot;);
this.load.image(&quot;tree&quot;, &quot;level1/oaktree.png&quot;);
this.load.image(&quot;boom&quot;, &quot;http://server.com/explode.png&quot;);
</code></pre>
<p>Would load the <code>ball</code> file from <code>images/sprites/ball.png</code> and the tree from
<code>images/sprites/level1/oaktree.png</code> but the file <code>boom</code> would load from the URL
given as it's an absolute URL.</p>
<p>Please note that the path is added before the filename but <em>after</em> the baseURL (if set.)</p>
<p>Once a path is set it will then affect every file added to the Loader from that point on. It does <em>not</em> change any
file <em>already</em> in the load queue. To reset it, call this method with no arguments.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>path</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The path to use. Leave empty to reset.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L387">Line 387</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setPrefix"><span class="type-signature"></span>setPrefix( [prefix])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>An optional prefix that is automatically prepended to the start of every file key.</p>
<p>If prefix was <code>MENU.</code> and you load an image with the key 'Background' the resulting key would be <code>MENU.Background</code>.</p>
<p>Once a prefix is set it will then affect every file added to the Loader from that point on. It does <em>not</em> change any
file <em>already</em> in the load queue. To reset it, call this method with no arguments.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>prefix</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The prefix to use. Leave empty to reset.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L427">Line 427</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This Loader object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="spine"><span class="type-signature"></span>spine(key, jsonURL, atlasURL [, preMultipliedAlpha] [, textureXhrSettings] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated
atlas files are scanned for any texture files present in them, which are then loaded. If you have exported
your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black
outlines around skeleton textures.</p>
<p>The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Spine cache.
Loading a file using a key that is already taken will result in a warning.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.spine({
    key: 'mainmenu',
    jsonURL: 'boy.json',
    atlasURL: 'boy.atlas',
    preMultipliedAlpha: true
});
</code></pre>
<p>If you need to load multiple Spine atlas files, provide them as an array:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);
}
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.SpineFileConfig</code> for more details.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the data from the Spine plugin.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.JSONFileConfig">Phaser.Types.Loader.FileTypes.JSONFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The absolute or relative URL to load the Spine json file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The absolute or relative URL to load the Spine atlas file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.atlas</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.atlas&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>preMultipliedAlpha</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>Do the texture files include pre-multiplied alpha or not?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.19.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/plugins/spine/src/SpinePlugin.js">plugins/spine/src/SpinePlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/plugins/spine/src/SpinePlugin.js#L565">Line 565</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="spritesheet"><span class="type-signature"></span>spritesheet(key [, url] [, frameConfig] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.</p>
<p>The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,
and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where
the frames are packed in a way where they take up the least amount of space, and are referenced by their names,
not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of
what sort of file you're actually trying to load.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
of animated gifs to Canvas elements.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.spritesheet({
    key: 'bot',
    url: 'images/robot.png',
    frameConfig: {
        frameWidth: 32,
        frameHeight: 38,
        startFrame: 0,
        endFrame: 8
    }
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
// and later in your game ...
this.add.image(x, y, 'bot', 0);
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>PLAYER.</code> and the key was <code>Running</code> the final key will be <code>PLAYER.Running</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.spritesheet({
    key: 'logo',
    url: 'images/AtariLogo.png',
    normalMap: 'images/AtariLogo-n.png',
    frameConfig: {
        frameWidth: 256,
        frameHeight: 80
    }
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.SpriteSheetFileConfig">Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.SpriteSheetFileConfig">Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>frameConfig</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.ImageFrameConfig">Phaser.Types.Loader.FileTypes.ImageFrameConfig</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The frame configuration object. At a minimum it should have a <code>frameWidth</code> property.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SpriteSheetFile.js">src/loader/filetypes/SpriteSheetFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SpriteSheetFile.js#L59">Line 59</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="start"><span class="type-signature"></span>start()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Starts the Loader running. This will reset the progress and totals and then emit a <code>start</code> event.
If there is nothing in the queue the Loader will immediately complete, otherwise it will start
loading the first batch of files.</p>
<p>The Loader is started automatically if the queue is populated within your Scenes <code>preload</code> method.</p>
<p>However, outside of this, you need to call this method to start it.</p>
<p>If the Loader is already running this method will simply return.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L680">Line 680</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li><a href="Phaser.Loader.Events.html#event:START">Phaser.Loader.Events#event:START</a></li>
    </ul>
    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="svg"><span class="type-signature"></span>svg(key [, url] [, svgConfig] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they
will be rendered to bitmap textures and stored in the Texture Manager.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.svg('morty', 'images/Morty.svg');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.SVGFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.svg('morty', 'images/Morty.svg');
// and later in your game ...
this.add.image(x, y, 'morty');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.html&quot;. It will always add <code>.html</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture
at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down
or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize
the SVG to:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });
}
</code></pre>
<p>Or when using a configuration object:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg',
    svgConfig: {
        width: 300,
        height: 600
    }
});
</code></pre>
<p>Alternatively, you can just provide a scale factor instead:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });
}
</code></pre>
<p>Or when using a configuration object:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg',
    svgConfig: {
        scale: 2.5
    }
});
</code></pre>
<p>If scale, width and height values are all given, the scale has priority and the width and height values are ignored.</p>
<p>Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.SVGFileConfig">Phaser.Types.Loader.FileTypes.SVGFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.SVGFileConfig">Phaser.Types.Loader.FileTypes.SVGFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.svg</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.svg&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>svgConfig</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.SVGSizeConfig">Phaser.Types.Loader.FileTypes.SVGSizeConfig</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The svg size configuration object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SVGFile.js">src/loader/filetypes/SVGFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/SVGFile.js#L197">Line 197</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="text"><span class="type-signature"></span>text(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Text file, or array of Text files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.text('story', 'files/IntroStory.txt');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Text Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.text({
    key: 'story',
    url: 'files/IntroStory.txt'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.TextFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.text('story', 'files/IntroStory.txt');
// and later in your game ...
var data = this.cache.text.get('story');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the text from the Text Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;story&quot;
and no URL is given then the Loader will set the URL to be &quot;story.txt&quot;. It will always add <code>.txt</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.TextFileConfig">Phaser.Types.Loader.FileTypes.TextFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.TextFileConfig">Phaser.Types.Loader.FileTypes.TextFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.txt</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.txt&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TextFile.js">src/loader/filetypes/TextFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TextFile.js#L88">Line 88</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="tilemapCSV"><span class="type-signature"></span>tilemapCSV(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a CSV Tilemap file, or array of CSV files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.tilemapCSV('level1', 'maps/Level1.csv');
}
</code></pre>
<p>Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.</p>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapCSV({
    key: 'level1',
    url: 'maps/Level1.csv'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapCSV('level1', 'maps/Level1.csv');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the text from the Tilemap Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;level&quot;
and no URL is given then the Loader will set the URL to be &quot;level.csv&quot;. It will always add <code>.csv</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.TilemapCSVFileConfig">Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.TilemapCSVFileConfig">Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.csv</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.csv&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapCSVFile.js">src/loader/filetypes/TilemapCSVFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapCSVFile.js#L102">Line 102</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="tilemapImpact"><span class="type-signature"></span>tilemapImpact(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an Impact.js Tilemap file, or array of map files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.tilemapImpact('level1', 'maps/Level1.json');
}
</code></pre>
<p>Impact Tilemap data is created the Impact.js Map Editor called Weltmeister.</p>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapImpact({
    key: 'level1',
    url: 'maps/Level1.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapImpact('level1', 'maps/Level1.json');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the text from the Tilemap Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;level&quot;
and no URL is given then the Loader will set the URL to be &quot;level.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.TilemapImpactFileConfig">Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.TilemapImpactFileConfig">Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.7.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapImpactFile.js">src/loader/filetypes/TilemapImpactFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapImpactFile.js#L63">Line 63</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="tilemapTiledJSON"><span class="type-signature"></span>tilemapTiledJSON(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
}
</code></pre>
<p>The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.</p>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapTiledJSON({
    key: 'level1',
    url: 'maps/Level1.json'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Story</code> the final key will be <code>LEVEL1.Story</code> and
this is what you would use to retrieve the text from the Tilemap Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;level&quot;
and no URL is given then the Loader will set the URL to be &quot;level.json&quot;. It will always add <code>.json</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.TilemapJSONFileConfig">Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.TilemapJSONFileConfig">Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.json</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.json&quot;. Or, a well formed JSON object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapJSONFile.js">src/loader/filetypes/TilemapJSONFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/TilemapJSONFile.js#L63">Line 63</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="unityAtlas"><span class="type-signature"></span>unityAtlas(key [, textureURL] [, atlasURL] [, textureXhrSettings] [, atlasXhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>If you call this from outside of <code>preload</code> then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.</p>
<p>Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.</p>
<p>Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.</p>
<p>The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.unityAtlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.txt'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig</code> for more details.</p>
<p>Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
</code></pre>
<p>To get a list of all available frames within an atlas please consult your Texture Atlas software.</p>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>MENU.</code> and the key was <code>Background</code> the final key will be <code>MENU.Background</code> and
this is what you would use to retrieve the image from the Texture Manager.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;alien&quot;
and no URL is given then the Loader will set the URL to be &quot;alien.png&quot;. It will always add <code>.png</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the <code>url</code> where the second element is the normal map:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt');
</code></pre>
<p>Or, if you are using a config object use the <code>normalMap</code> property:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.unityAtlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.txt'
});
</code></pre>
<p>The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.</p>
<p>Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.UnityAtlasFileConfig">Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.UnityAtlasFileConfig">Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture image file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.png</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.png&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load the texture atlas data file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.txt</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.txt&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>textureXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>atlasXhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/UnityAtlasFile.js">src/loader/filetypes/UnityAtlasFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/UnityAtlasFile.js#L107">Line 107</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="update"><span class="type-signature"></span>update()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Called automatically during the load process.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.10.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L745">Line 745</a>)</dt>
	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateProgress"><span class="type-signature"></span>updateProgress()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Called automatically during the load process.
It updates the <code>progress</code> value and then emits a progress event, which you can use to
display a loading bar in your game.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js">src/loader/LoaderPlugin.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/LoaderPlugin.js#L729">Line 729</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li><a href="Phaser.Loader.Events.html#event:PROGRESS">Phaser.Loader.Events#event:PROGRESS</a></li>
    </ul>
    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="video"><span class="type-signature"></span>video(key [, urls] [, loadEvent] [, asBlob] [, noAudio] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds a Video file, or array of video files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.video('intro', [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ]);
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global Video Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Video Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Video Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.video({
    key: 'intro',
    url: [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ],
    asBlob: false,
    noAudio: true
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.VideoFileConfig</code> for more details.</p>
<p>The URLs can be relative or absolute. If the URLs are relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to them.</p>
<p>Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats.
mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which <em>one</em> file to load based on
browser support, starting with the first in the array and progressing to the end.</p>
<p>Unlike most asset-types, videos do not <em>need</em> to be preloaded. You can create a Video Game Object and then call its <code>loadURL</code> method,
to load a video at run-time, rather than in advance.</p>
<p>Note: The ability to load this type of file will only be available if the Video File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.VideoFileConfig">Phaser.Types.Loader.FileTypes.VideoFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.VideoFileConfig">Phaser.Types.Loader.FileTypes.VideoFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>urls</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Array.&lt;string></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The absolute or relative URL to load the video files from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>loadEvent</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'loadeddata'
                
                </td>
            

            <td class="description last"><p>The load event to listen for when <em>not</em> loading as a blob. Either <code>loadeddata</code>, <code>canplay</code> or <code>canplaythrough</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>asBlob</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>Load the video as a data blob, or stream it via the Video element?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>noAudio</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>Does the video have an audio track? If not you can enable auto-playing on it.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.20.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/VideoFile.js">src/loader/filetypes/VideoFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/VideoFile.js#L295">Line 295</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="xml"><span class="type-signature"></span>xml(key [, url] [, xhrSettings])</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Adds an XML file, or array of XML files, to the current load queue.</p>
<p>You can call this method from within your Scene's <code>preload</code>, along with any other files you wish to load:</p>
<pre class="prettyprint source lang-javascript"><code>function preload ()
{
    this.load.xml('wavedata', 'files/AlienWaveData.xml');
}
</code></pre>
<p>The file is <strong>not</strong> loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's <code>preload</code> method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's <code>preload</code> method and then when the
Scene's <code>create</code> method is called you are guaranteed that all of those assets are ready for use and have been
loaded.</p>
<p>The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the XML Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the XML Cache first, before loading a new one.</p>
<p>Instead of passing arguments you can pass a configuration object, such as:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.xml({
    key: 'wavedata',
    url: 'files/AlienWaveData.xml'
});
</code></pre>
<p>See the documentation for <code>Phaser.Types.Loader.FileTypes.XMLFileConfig</code> for more details.</p>
<p>Once the file has finished loading you can access it from its Cache using its key:</p>
<pre class="prettyprint source lang-javascript"><code>this.load.xml('wavedata', 'files/AlienWaveData.xml');
// and later in your game ...
var data = this.cache.xml.get('wavedata');
</code></pre>
<p>If you have specified a prefix in the loader, via <code>Loader.setPrefix</code> then this value will be prepended to this files
key. For example, if the prefix was <code>LEVEL1.</code> and the key was <code>Waves</code> the final key will be <code>LEVEL1.Waves</code> and
this is what you would use to retrieve the text from the XML Cache.</p>
<p>The URL can be relative or absolute. If the URL is relative the <code>Loader.baseURL</code> and <code>Loader.path</code> values will be prepended to it.</p>
<p>If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is &quot;data&quot;
and no URL is given then the Loader will set the URL to be &quot;data.xml&quot;. It will always add <code>.xml</code> as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.</p>
<p>Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="Phaser.Types.Loader.FileTypes.html#.XMLFileConfig">Phaser.Types.Loader.FileTypes.XMLFileConfig</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Types.Loader.FileTypes.html#.XMLFileConfig">Phaser.Types.Loader.FileTypes.XMLFileConfig</a>></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>The key to use for this file, or a file configuration object, or array of them.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>The absolute or relative URL to load this file from. If undefined or <code>null</code> it will be set to <code>&lt;key&gt;.xml</code>, i.e. if <code>key</code> was &quot;alien&quot; then the URL will be &quot;alien.xml&quot;.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>xhrSettings</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Types.Loader.html#.XHRSettingsObject">Phaser.Types.Loader.XHRSettingsObject</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	
	<dt class="tag-since method-doc-label method-doc-details-label">Since: 3.0.0</dt>
	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source: <a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/XMLFile.js">src/loader/filetypes/XMLFile.js</a> (<a href="https://github.com/photonstorm/phaser/tree/v3.51.0/src/loader/filetypes/XMLFile.js#L94">Line 94</a>)</dt>
	

	

	

	
</dl>


    

    
    <h5>Fires:</h5>
    <ul>
        <li>Phaser.Loader.LoaderPlugin#event:ADD</li>
    </ul>
    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The Loader instance.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Loader.LoaderPlugin.html">Phaser.Loader.LoaderPlugin</a></span>



    </dd>
</dl>


        

    
</dd>

        </dl>
    

    

    
</article>

</section>




		</div>
	</div>

	<div class="clearfix"></div>

	
		<div class="col-md-3">
			<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
		</div>
	

</div>
</div>


    <div class="modal fade" id="searchResults">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">Search results</h4>
          </div>
          <div class="modal-body"></div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div>


<footer>

    <div align="center" style="margin-bottom: 32px">

        <img src="img/phaser3-logo.png" alt="Phaser 3 Logo" title="Phaser 3" /><br />

        <p>Please <a href="https://phaser.io/community/donate">support Phaser development</a> via Patreon or PayPal.</p>

        <p>Found an error in the docs? <a href="https://github.com/photonstorm/phaser/issues">Open an issue</a> and let us know where!</p>

    </div>


	<span class="copyright">
	Phaser Copyright © 2021 Photon Storm Ltd and the contributors to the Phaser projects.
	</span>

<span class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a>
	
		on January 5th 2021, 5:26:08 pm
	
	using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>

<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>

    <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>


<script>
$( function () {
	$( "[id*='$']" ).each( function () {
		var $this = $( this );

		$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
	} );

	$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
		var $this = $( this );

		var example = $this.find( "code" );
		exampleText = example.html();
		var lang = /{@lang (.*?)}/.exec( exampleText );
		if ( lang && lang[1] ) {
			exampleText = exampleText.replace( lang[0], "" );
			example.html( exampleText );
			lang = lang[1];
		} else {
			var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
			lang = langClassMatch ? langClassMatch[1] : "javascript";
		}

		if ( lang ) {

			$this
			.addClass( "sunlight-highlight-" + lang )
			.addClass( "linenums" )
			.html( example.html() );

		}
	} );

	Sunlight.highlightAll( {
		lineNumbers : true,
		showMenu : true,
		enableDoclinks : true
	} );

	$.catchAnchorLinks( {
        navbarOffset: 10
	} );
	$( "#toc" ).toc( {
		anchorName  : function ( i, heading, prefix ) {
			return $( heading ).attr( "id" ) || ( prefix + i );
		},
		selectors   : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
		showAndHide : false,
		smoothScrolling: true
	} );

	$( "#main span[id^='toc']" ).addClass( "toc-shim" );
	$( '.dropdown-toggle' ).dropdown();

    $( "table" ).each( function () {
      var $this = $( this );
      $this.addClass('table');
    } );

} );
</script>



<!--Navigation and Symbol Display-->


<!--Google Analytics-->

<script>
	(function ( i, s, o, g, r, a, m ) {
		i['GoogleAnalyticsObject'] = r;
		i[r] = i[r] || function () {
			(i[r].q = i[r].q || []).push( arguments )
		}, i[r].l = 1 * new Date();
		a = s.createElement( o ),
			m = s.getElementsByTagName( o )[0];
		a.async = 1;
		a.src = g;
		m.parentNode.insertBefore( a, m )
	})( window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga' );

	ga( 'create', 'UA-44006568-1', 'phaser.io' );
	ga( 'send', 'pageview' );
</script>



    <script type="text/javascript">
        $(document).ready(function() {
            SearcherDisplay.init();
        });
    </script>


</body>
</html>